Daily Lucky Numbers:
15
18
24
43
48
49

Site's slow to connect

Started by Dave, March 07, 2026, 02:15:48 AM

Previous topic - Next topic

Dave

Hi Chen,

For some reason the last 2 days the site has been very slow to connect. This morning I got

QuoteThis site can't be reached
web-develop.ca took too long to respond

it obviously did eventually connect as I'm posting this message
If you want play quizzes or games click below

Chen Zhen


Yes something is up that I'll have to figure out.
There are no errors in the SMF log but I'll check out the server logs to see if it shows any problems.

Chen Zhen


I'm not sure just yet but it might be due to a PHP FPM misconfiguration.
Some adjustments have been applied which will hopefully fix the issue.

Thanks for the report. 

Dave

If you want play quizzes or games click below

Chen Zhen


There was also an update to the SMF main package that has fixes in it regarding the mail queue and PHP sessions which has been applied.
It may or may not be related because I did have a misconfiguration regarding sessions that I adjusted.

I am using memcached for sessions within SMF settings but my PHP-FPM configuration was not set properly for it and had to be adjusted.
Hopefully this issue is now resolved.   

Dave

Quote from: Chen Zhen on March 08, 2026, 01:44:40 PMThere was also an update to the SMF main package that has fixes in it regarding the mail queue and PHP sessions which has been applied.
It may or may not be related because I did have a misconfiguration regarding sessions that I adjusted.

I am using memcached for sessions within SMF settings but my PHP-FPM configuration was not set properly for it and had to be adjusted.
Hopefully this issue is now resolved.   

I was just going to do a post about that, just as a reminder that if you did the 'ScheduledTasks.php' edit for the emails to reverse that before you update.
If you want play quizzes or games click below

Chen Zhen

#6
The session fix seems to be working good now and the other thing you reported in the shoutbox seems to be from some sort of brute force bot attack.

It seems my site was targeted by some sort of script that bombards the server with querying files (non-existent) that was forcing PHP-FPM to handle the errors which was overwhelming it. 2 IP's were mostly involved so I blocked them but that won't stop it from happening again.

I didn't realize until I looked into it that it's best to configure Apache to handle those type of errors instead of leaving it up to PHP. I had to make some adjustments in my Apache configuration file.

ref. php-fpm ProxyErrorOverride on

I also added a custom error page while I was at it.
At one time I used to have an assortment of custom error pages but must have neglected to include them at some point.

Dave

Thanks for the info. At you know now I wasn't seeing things  ;)
If you want play quizzes or games click below

Skhilled

Quote from: Chen Zhen on March 21, 2026, 12:04:41 AMThe session fix seems to be working good now and the other thing you reported in the shoutbox seems to be from some sort of brute force bot attack.

It seems my site was targeted by some sort of script that bombards the server with querying files (non-existent) that was forcing PHP-FPM to handle the errors which was overwhelming it. 2 IP's were mostly involved so I blocked them but that won't stop it from happening again.

I didn't realize until I looked into it that it's best to configure Apache to handle those type of errors instead of leaving it up to PHP. I had to make some adjustments in my Apache configuration file.

ref. php-fpm ProxyErrorOverride on

I also added a custom error page while I was at it.
At one time I used to have an assortment of custom error pages but must have neglected to include them at some point.

When I click that link I get:

QuoteSomething went wrong and an AI response wasn't generated.

Even when I'm logged in I get the same.

Chen Zhen

#9
That's odd because the link works fine for me.

Just use the google search engine and type "php-fpm ProxyErrorOverride on" in the search input.
It should bring up the AI response which you can click on.

Assuming you are using PHP-FPM...
The example shown has a generic path for the socket, you'll have to find where the "SetHandler" line is in your Apache config file and add "ProxyErrorOverride On" after it. There is a second option below it for adding a condition instead which I will try if the first example causes any problems.

Dave

It did the same for me too

Something went wrong and an AI response wasn't generated.
If you want play quizzes or games click below