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
Related
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
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 have an Apache 2.4.9 web-server running php5 on windows7. It had been working fine, but now it isn't running. I see nothing about php in the application logs, nor in the Apache logs.
I do not know how to troubleshoot php5 in windows. I cannot run any phpinfo(); scripts, but I can see where php is started in the Apache logs
[Mon May 12 17:26:49.832429 2014] [mpm_winnt:notice] [pid 1388:tid 528] AH00455: Apache/2.4.9 (Win32) PHP/5.5.11 configured -- resuming normal operations
I see no notice of PHP crashing though.
The page is http://rm362c.umecheme.maine.edu/
and you can see the php in the source now.
what steps can I take to troubleshoot and debug php5 as it pertains to Apache2.4 and Windows7?
Add below lines to php.ini to view any php error in your browser --
error_reporting = -1
display_errors = On
Remove above lines in your production environment (Source: http://php.net/manual/en/errorfunc.configuration.php#89648 ).
For more check http://php.net/manual/en/errorfunc.configuration.php .
If port 80 is blocked by Skype or some other applications you will not be able to run apache since http requires port 80 and https require port 443 open. or if you have IIS web server running it also could be reason.
Please go through below article for further details if its xampp on windows7
http://www.nextofwindows.com/how-to-troubleshoot-xampp-apache-not-running-on-windows-7/
I use Redis to build a IOS SNS App (for restful api). As more user use it, errors happened.
It throws out :
Uncaught exception 'RedisException' with message 'read error on connection'
in /data1/www/htdocs/11/iossns/Model/Core/Redis.php
I don't know how to solve the problem.
Can you help?
Thank you!
What PHP-to-Redis library are you using? Here’s the official list from Redis. What is your webserver? (Apache, nginx, etc) How is PHP running? (CGI, FPM, mod_php, etc)
Here’s a thread for the same exception message in phpredis. It turns out phpredis does not currently support persistent connections with php-fpm. Version 2.2.3 of phpredis has some connection handling changes that might decrease the frequency of your issues.
I recommend checking your Redis connector configuration to…
disable persistent connections
enable connection retries
increase log verbosity
You might also consider adjustments to (generally increasing) default_socket_timeout in php.ini.
It's a redis 6 bug.
You can do this:
sudo nano /etc/systemd/system/redis.service
# ADD THIS TO [Service] SECTION
ExecStartPost=/bin/sh -c "echo $MAINPID > /var/run/redis/redis.pid"
sudo systemctl daemon-reload && sudo systemctl restart redis-server
In my case in Ubuntu 20.04 I discovered systemctl was trying to restart service because it couldn't find the /run/redis/redis-server.pid
redis-server.service: Failed with result 'timeout'.
Feb 25 17:51:09 artamredis systemd[1]: Failed to start Advanced key-value store.
Feb 25 17:51:09 artamredis systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 18.
Feb 25 17:51:09 artamredis systemd[1]: Stopped Advanced key-value store.
Feb 25 17:51:09 artamredis systemd[1]: Starting Advanced key-value store...
Feb 25 17:51:09 artamredis systemd[1]: redis-server.service: Can't open PID file /run/redis/redis-server.pid (yet?) after start: Operation not permitted
In order to solve it in /etc/redis/redis.conf file find
pidfile /var/run/redis_6379.pid
and change to
pidfile /run/redis/redis-server.pid