Getting 503 Errors every couple of hours

SYSTEM INFORMATION
OS type and version Rocky Linux 9.4
Webmin version 2.111
Virtualmin version 7.20.2
Webserver version Apache version 2.4.57
Related packages Most porbably PHP

I am using a South African VPS (It’s not a cloud service)

I have noticed since I started using Virtualmin that the PHP stops running I am not too sure what is the cause of it I have researched the problem and some people are having simular issues to me but there are no fixes I can see for it. it can happen daily but for some reason but it definitely occurs between Sunday and Monday.

I do have multiple versions of PHP as well and one can work and the other can fail I have also seen that a lot of people have similar issues with various versions of PHP.

I checked with ChatGPT and that said it is most probably there is something that overuses PHP and automatically cuts off. mostly all my virtual servers are running WordPress so I am not sure if it is a case that someone is trying to brute-force it.

This is the only thing I can find in the logs that could be related to this:
[Mon Aug 05 21:20:07.942403 2024] [proxy:error] [pid 490619:tid 490761] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (:80) failed
[Mon Aug 05 21:20:07.362802 2024] [proxy_fcgi:error] [pid 490619:tid 490760] [client 34.94.126.12:60716] AH01079: failed to make connection to backend: httpd-UDS
[Mon Aug 05 21:20:07.362772 2024] [proxy:error] [pid 490619:tid 490760] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php-fpm/1718793774442731.sock (
:80) failed
[Mon Aug 05 21:20:06.800281 2024] [proxy_fcgi:error] [pid 490603:tid 490718] [client 34.94.126.12:60569] AH01079: failed to make connection to backend: httpd-UDS

If there are any suggestions that I can troubleshoot this or even just knowing what I can will be much Appreciated.

Thanks

I encountered the same problem.

Are you saying:

  1. Your Virtualmin server works normally except on Sundays and Mondays (quote: but it definitely occurs between Sunday and Monday)
  2. Your Virtualmin server and PHP work normally except when you login to Virtualmin (quote: I have noticed since I started using Virtualmin that the PHP stops running)

Questions:

  1. Did you install CalmAV with Virtualmin?
  2. Is there a cron job which triggers the 503s
  3. How much RAM do you have on your system?
  4. When you get 503s, what remedial steps do you need to take? Do you reboot to server? Do you restart PHP? What do you do?

1.Yes
2.I have not created any cron jobs that will do that. Unless there is something that I dont know of that comes in by default
3. 12GB
4. I restart the PHP where that virtual server belongs or just restart the whole server

Are you saying:

1. Your Virtualmin server works normally except on Sundays and Mondays (quote: but it definitely occurs between Sunday and Monday)
2. Your Virtualmin server and PHP work normally except when you login to Virtualmin (quote: I have noticed since I started using Virtualmin that the PHP stops running)
  1. No, what I am saying is that it is mostly random, but I have noticed that it happens most definitely between Monday and Sunday. This could be coincidental.
  2. No, What I mean to say I always had this issue for a year or so now with 2 different Linuxs alma Linux and rocky Linux. It does not matter if I login or not it happens randomly

Are any of the sites high traffic?

What is your max ram value for your php scripts?

When you have the different Linux versions, were they were always on the same VPS?

Brute forcing does not work on regular schedule, cron jobs do.

You can set pseudo cron tasks in wordpress.

So check if there any cronjobs with the webmin cron manager and then work through each wordpress I stall to see if they have any pseudo cronjobs that can break your server.

Are any of the sites high traffic?

Not that much traffic

What is your max ram value for your php scripts?

128MB

When you have the different Linux versions, were they were always on the same VPS?

Yes

So check if there any cronjobs with the webmin cron manager and then work through each wordpress I stall to see if they have any pseudo cronjobs that can break your server.

Sure I will do so thanks

The physical server you are on might be over provisioned. They say you have 12GB RAM but maybe this 12GB is not always available to your server, It is worth checking this with your provider.

I have spoken on another forum post and some one suggested that I might of added multiple PHP version wrong.
For example I only did this

. /etc/os-release && repo_dir=$([ "$ID" = "fedora" ] && echo "fedora" || echo "enterprise") && dnf -y install "https://rpms.remirepo.net/$repo_dir/remi-release-$(rpm -E %$ID).rpm" && dnf clean all

dnf install php81-php-{cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,curl,xml,zip}

But I never did this:

for php in $(scl list-collections 2>/dev/null | grep 'php' | sed 's/$/-php/') php; do for ext in curl intl; do sudo dnf -y install "${php}-${ext}"; done; done

Do you think this could be the issue?

I did run it now and will see what happens

We are also getting the same issue but on rocky linux 8. It seems that happens on all new servers we have created the last months. And it happens on all of them every sunday at 6am.

Could this be happening specifically after log rotation?

@Jamie, have we fixed that post-command in log rotation for the PHP-FPM restart that we discussed earlier?

Sorry I missed the discussion on log rotation. I cannot find any relevant topics. Can you give me a link?

We discussed it in private.

Go to System ⇾ Log File Rotation and replace the Commands to run after rotation for PHP-FPM in the relevant log file with:

systemctl reload php*fpm*
1 Like

No not yet … but it’s on the ToDO list

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.