Daily Lucky Numbers:
15
16
20
25
27
34

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 PHP 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