I am trying to run a script every three hours on my Wordpress installation using cron. The script consists of a foreach which is quite slow to execute. In local the cron job works well but in production on my Vultr server, I get the following error:
[proxy_fcgi:error] [pid 32369:tid 139804532532992] (70007)The timeout specified has expired: [client 45.11.111.111:47111] AH01075: Error dispatching request to : (polling)
I am a web developer but I have little to no experience in administrating a server. I read some answers about this problem and modified the timeout in /etc/apache2-rc/conf.d/mysite.conf :
<Proxy ${SOCK}>
ProxySet keepalive=On
ProxySet timeout=999990000000000
ProxySet retry=0
</Proxy>
This still doesn't work. Any idea how I could solve this problem? Thanks.
Update
The solution was to restart Apache. Thanks Noman.
The "ProxySet timeout" attribute should do the trick.
Please attempt to restart web server and check again.
You can restart by:
service apache2 restart
Related
after (just) restarting my apache server, which runs a php script,
the website no more works.
I can see the landing page, and that's it.
(cannot click buttons, no reaction, no backend entrance..)
I have checked log files of server:
Everything is ok & working.
I have checked log files of apache, and got these errors:
HTTPD
The timeout specified has expired:
[client 2.247.241.109:11131] AH01075: Error dispatching request to : (polling), referer: (ip of my server)
Do you know what is going on?
I guessed that apache won't execute php (script) any more, is that correct?
Or is it something different?
Big thanks to anyone who can help me out.
Try the following:
service httpd restart
systemctl restart httpd
Make sure no rerwite rules are added in the .htaccess file.
I have restarted my AWS EC2 LAMP stack server with $ Sudo /etc/init.d/httpd restart after having made some changes to enable .htaccess on httpd.conf.
My server seems to have now crashed and is throwing Http error 503.
I've checked the error log and found this but not sure if it's relevant:
[Sun Sep 08 03:16:02.048610 2019] [http2:warn] [pid 2599] AH10034: The
mpm module (prefork.c) is not supported by mod_http2. The mpm
determines how things are processed in your server. HTTP/2 has more
demands in this regard and the currently selected mpm will just not
do. This is an advisory warning. Your server will continue to work,
but the HTTP/2 protocol will be inactive.
Primarily I'm just trying to get my servers back up and running. Any help at this point is like a glass of water in the Sahara - many many thanks in advance
I have updated my working Froxlor installation to PHP 7.
All my customer-sites work perfectly fine (with PHP 7 via FPM).
The only problem is, that if I want to access the Froxlor Backend, I get an Erorr 503.
The apache Error-Log says:
`[Tue Oct 11 10:01:04.067069 2016] [proxy:error] [pid 23949] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.0-fpm.sock (*) failed`
`[Tue Oct 11 10:01:04.089648 2016] [proxy_fcgi:error] [pid 23949] [client xx.xx.xx.xx:1819] AH01079: failed to make connection to backend: httpd-UDS`
The Error-Log of PHP-FPM says nothing.
The same thing happens, if I try to access the server directly via IP.
System-Details:
Debian 8
Apache 2.4
PHP7
PHP7-FPM
Where I have to serach for the Problem? If needed, config-files can be provided.
If you are using PHP-FPM, the problem may also be that you need to start the PHP service.
Apache does not automatically stop the process, so you will either manually start it up or automatically on startup
For PHP 7.x (remember to include your version):
service php7.x-fpm start
For PHP 7:
service php7-fpm start
For PHP 5:
service php-fpm start
This will begin the FPM process for you.
Additionally, you may also want the process to startup on boot. To do that simply enter the following, of course considering your respective version.
systemctl enable php7.x-fpm
I had same issue, on New server having php7.4 and these virtual host configuration files(located in /etc/apache2/sites-available/ directory) i migrated from server having php7.2.
When checked in detail i found
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>
Which then i replaced with
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
Basically updating php version and it worked fine after restarting apache2
Steps I made in order to make it work on my host:
in /etc/apt/sources.list - added non-free to debian repository
apt update
apt install libapache2-mod-fastcgi
a2enmod fastcgi
(That made the "Invalid command 'FastCgiExternalServer' error, I encountered on a new installation", go away).
In Froxlor - "Settings" - "Froxlor VirtualHost settings":
[X] Enable PHP-FPM for the Froxlor vHost If enabled, Froxlor will also be running under a local user.
I also removed all "Listen" entries from apache2's ports.conf
I recently set up a new vps (Cent OS7) with custombuild 2.0, Apache 2.4 with nginx reverse proxy, php-fpm 5.6 (and 7), mpm worker, MariaDB 10.1, mod_security and csf.
For some reason Nginx uses 675mb of memory (http://prntscr.com/91bu6t) with only 1 (1mb) website on the server and 1 light (300mb) website which consits mostly of pictures.
When i restart nginx the memory usage is still about 175mb after some time, back to +/- 675mb again.
I don't think this is normal. The config files seem ok.
And I don't see much in the nginx logs, except these lines returning:
2015/11/10 21:20:41 [notice] 24971#0: ModSecurity for nginx
(STABLE)/2.9.0 (http://www.modsecurity.org/) configured. 2015/11/10
21:20:41 [notice] 24971#0: ModSecurity: APR compiled version="1.5.2";
loaded version="1.5.2" 2015/11/10 21:20:41 [notice] 24971#0:
ModSecurity: PCRE compiled version="8.20 "; loaded version="8.20
2011-10-21" 2015/11/10 21:20:41 [notice] 24971#0: ModSecurity: LIBXML
compiled version="2.9.2" 2015/11/10 21:20:41 [notice] 24971#0:
ModSecurity: Status engine is currently disabled, enable it by set
SecStatusEngine to On.
Are these lines indicating an issue? (Google doesn't make me much wiser..)
And mainly, why is the nginx memory usage so high with so little going on the server? What to do about it?
Thanks!
Hard to tell based on just the output of your admin panel but it could be that the server / nginx is caching a lot of memory to improve performance. If you have shell access, you can see more details using for example the top command.
If caching is the case, there is nothing wrong with that, it just optimizes your memory use versus disk use.
I am having errors setting up my webserver on my vps. At the moment I have followed this tutorial: https://www.howtoforge.com/apache_php_mysql_on_centos_6.5_lamp
I am stuck on the /etc/init.d/httpd start part. When I run this command, I get the following output:
[root#localhost conf]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Mon Feb 23 21:27:02 2015] [warn] NameVirtualHost *:80 has no VirtualHosts
[FAILED]
And there is no more output. Prior to this I was getting this error:
[root#localhost etc]# /etc/init.d/httpd start
Starting httpd: httpd: Could not reliably determine the server's fully
qualified domain name, using localhost.localdomain for ServerName [FAILED]
I googled and managed to get this error to disappear by editting /etc/httpd/conf/httpd.conf - I simply uncommented the ServerName variable and changed the value to localhost. So it looks like:
ServerName localhost - In my mind this makes sense since localhost is the external ip server anyways. [NOTE]: Even if I change it to ServerName <external-ip> I still get the same output when restarting httpd.
Can anyone help me get past this step? I've been googling for about 1-2 hours. Can't find anything. Anyone had the same error and mind pointing me in the right direction?
UPDATE 1:
cat /var/log/httpd/error_log
The output is basically normally operation until it reaches this point at which it just spams the rest of the log with it
(2)No such file or directory: httpd: could not open error log file
/srv/www/java-applet/logs/error.log - Unable to open logs
So I guess the error occurs since it cannot find the specified log file? Where can I change this? Why is this even occurring if I have a default installation of httpd?
Update 2:
Nevermind, I just solved it by making the directory that it said it was missing. Lame...