Missing Temporary Folder Error in WordPress
At my own virtual cPanel server running Centoa 7 there are only 2 accounts, one is a test site and the other is a wordpress site with lots of visitors.
A few times a week i need to restart php fpm because wordpress can not acces the tmp folder. In wordpress i get a error with file upload saying there is no temporary folder. But the tmp folder is present and not full. After restart of php fpm, everything is working fine again.
I need some help to find out what is the cause of this problem. Opening a ticket at the moment the problem happens is not realy a good option because at that moment we need to publish a news item and that cant wait for a long time.
-
Hi @Edwin Tjallings Since your profile indicates that you're a Root Administrator, I'll assume that you have root access to the server. In that case can you please include any related information (for when the issues occur) from the following log files? /etc/apache2/logs/error_log
/opt/cpanel/ea-phpXX/root/usr/var/log/php-fpm/error.log
(replace ea-phpXX with the ea-php version your site is running) Thanks!0 -
Good night, I have the same problem I ran the command via root but I have the exit. print: Screenshot 0 -
Hey there, @Quintanilha You would be able to just enter those file names, but you'd need to run a command to look at them or watch them in real-time. Using a text editor, like Vim or Nano, would let you edit the file, but I like this method instead: tail -f /etc/apache2/logs/error_log
If you run that command and then reproduce the error in your browser the log will update in real-time while you watch the screen. You can then push ctrl + c to close the command when you are done watching. Can you try that and see if it helps?0 -
I executed the command informed tail -f /etc/apache2/logs/error_log but the command shows nothing related to the error mentioned above. I have more than 200 sites not working because of this error 0 -
If you have sites offline it's always best to put in a ticket so we can check the machine and get this resolved quickly. You may want to ensure your server is using CGI with mod_ruid2, or suPHP for the PHP handler, or else there can be issues with WordPress not being able to access directories properly. 0 -
When I run this command via ssh "root" /scripts/restartsrv_apache_php_fpm it works temporarily, but after about 5 minutes it returns to the previously registered error. 0 -
If you disable PHP-FPM does that allow things to work normally on the system, or are there still issues? 0 -
@jjdewit - there are two fpm services - the one for cPanel, and the one for Apache. The one for cPanel would not have any impact on your WordPress domains, as that is only used for cPanel internal processes. 0 -
Thank you, @cPRex. But what if the Apache one is not visible in WHM >> Service Manager? Has this moved to a different location? 0 -
Yes - you'd want to check WHM >> MutliPHP Manager for the PHP-FPM settings for the webserver. 0 -
So was a solution to this issue ever posted?? 0 -
@egillette - I don't believe it was ever determined that there was an issue on the cPanel side of things that was leading to this problem. Can you let me know what specific problem you're seeing at this time? 0 -
@Spirogg: Nope. This has been running on this particular server for awhile now (at least 3 weeks since I built this machine for the client): 58 23 * * * /bin/find /tmp/systemd-private*php-fpm.service* -name sess_* ! -mtime -1 -exec rm -f '{}' \; >> /dev/null It's in the root cron. That definitely DOES NOT resolve the issue - that's why I'm waiting for @cPRex to get back to me - I'm hoping somebody can shed light on this, because this issue happens on every server I've built since starting to implement PHP-FPM.. there are also write issues to the /tmp directory. WordPress sites typically bomb when trying to do updates, or add images via the Media upload tool. Strangely enough, like others have pointed out here - if I run the /scripts/restartsrv_apache_php_fpm or simply go to the "MultiPHP Manager" under "Software" and disable PHP-FPM globally, or for a particular website, everything starts working normally, and works normally indefinitely - I've come back 2 days later, 2 weeks later, and it works normally. If I enable PHP-FPM though, that's when the issues start. I manage nearly 400 servers, and this is the one consistent issues across all of them - I usually just disable PHP-FPM or tell my clients to disable PHP-FPM themselves, and the problem goes away. But the thing is, I'd like to figure this out for good, so that PHP-FPM can run on all these servers without causing problems for WordPress and other software being unable to write to the /tmp directory. 0 -
@Spirogg: Nope. This has been running on this particular server for awhile now (at least 3 weeks since I built this machine for the client): 58 23 * * * /bin/find /tmp/systemd-private*php-fpm.service* -name sess_* ! -mtime -1 -exec rm -f '{}' \; >> /dev/null It's in the root cron. That definitely DOES NOT resolve the issue - that's why I'm waiting for @cPRex to get back to me - I'm hoping somebody can shed light on this, because this issue happens on every server I've built since starting to implement PHP-FPM.. there are also write issues to the /tmp directory. WordPress sites typically bomb when trying to do updates, or add images via the Media upload tool. Strangely enough, like others have pointed out here - if I run the /scripts/restartsrv_apache_php_fpm or simply go to the "MultiPHP Manager" under "Software" and disable PHP-FPM globally, or for a particular website, everything starts working normally, and works normally indefinitely - I've come back 2 days later, 2 weeks later, and it works normally. If I enable PHP-FPM though, that's when the issues start. I manage nearly 400 servers, and this is the one consistent issues across all of them - I usually just disable PHP-FPM or tell my clients to disable PHP-FPM themselves, and the problem goes away. But the thing is, I'd like to figure this out for good, so that PHP-FPM can run on all these servers without causing problems for WordPress and other software being unable to write to the /tmp directory.
0 -
@cPRex Apache private /tmp directory, so the location would be /var/tmp/systemd-private--httpd.service-/. However, this is only important if you want to access the files from outside apache. @egillette If you create your own new temp and set that for Wordpress does it still give an error ? With PHP-FPM ? @cPRex is the /tmp directory mounted with noexec possibly this could be the issue as well. 0 -
here is one more article from Plesk Screenshot
0
Please sign in to leave a comment.
Comments
20 comments