Score:0

Server Send Code 521 While SSH running well

cv flag

I would like to ask a question regarding my server problem. I have no idea why it sent 521 code while resources is still fine. I think there is misconfiguration. I am using default of Webuzo panel. Nothing changed. I think the problem leads from php-fpm

request_slowlog_timeout = 5s
slowlog = var/log/php-fpm-dsimlife.logs
listen.allowed_clients = 127.0.0.1
pm = ondemand
pm.max_children = 5
pm.start_servers = 0
pm.min_spare_servers = 1
pm.max_spare_servers = 5
pm.max_requests = 20
pm.process_idle_timeout = 10
request_terminate_timeout = 120s
php_flag[allow_url_fopen] = off
php_flag[log_errors] = off
php_flag[short_open_tag] = off
php_value[disable_functions] = 
php_value[error_log] = 
php_value[error_reporting] = 
rlimit_files = 131072
rlimit_core = unlimited
catch_workers_output = yes
security.limit_extensions = FALSE 
env[HOSTNAME] = \$HOSTNAME
env[TMP] = /tmp
env[TMPDIR] = /tmp
env[TEMP] = /tmp

FYI, I am using Dual Xeon E5-2670 @2.60 Ghz 32GB server, and here is my php-fpm log

[20-Mar-2023 01:13:41] WARNING: [pool dsimlife-user] child 502345, script '/home/dsimlife/public_html/id1com/api.php' (request: "POST /api.php?f=syncAccount") executing too slow (5.824632 sec), logging
[20-Mar-2023 01:13:42] WARNING: [pool dsimlife-user] child 502462, script '/home/dsimlife/public_html/id1com/api.php' (request: "POST /api.php?f=getCompany") executing too slow (5.300816 sec), logging
[20-Mar-2023 01:13:42] WARNING: [pool dsimlife-user] child 502450, script '/home/dsimlife/public_html/id1com/api.php' (request: "POST /api.php?f=citizenActivity") executing too slow (6.625257 sec), logging
[20-Mar-2023 01:13:42] WARNING: [pool dsimlife-user] child 502348, script '/home/dsimlife/public_html/id1com/api.php' (request: "POST /api.php?f=getCompany") executing too slow (5.166035 sec), logging
[20-Mar-2023 01:13:59] WARNING: [pool dsimlife-user] child 502566, script '/home/dsimlife/public_html/id1com/api-admin.php' (request: "GET /api-admin.php?f=dailyTask&password=@bobby123@") executing too slow (6.047916 sec), logging
[20-Mar-2023 01:14:07] WARNING: [pool dsimlife-user] child 502592, script '/home/dsimlife/public_html/id1com/api-bot.php' (request: "GET /api-bot.php?f=runWork&password=@bobby123@") executing too slow (5.230719 sec), logging

Here is my error log

2023/03/20 00:34:56 [error] 487375#0: *73 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.70.189.120, server: id1.dsimlife.com, request: "POST /api.php?f=getCompanyLicense HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *235 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 162.158.162.128, server: id1.dsimlife.com, request: "POST /api.php?f=getCompanyWarehouse HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *296 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.70.142.115, server: id1.dsimlife.com, request: "POST /api.php?f=getCompany HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *294 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 162.158.38.172, server: id1.dsimlife.com, request: "POST /api.php?f=getCompanyWorkplace HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *290 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 162.158.170.239, server: id1.dsimlife.com, request: "POST /api.php?f=getCompanyPO HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *292 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 162.158.38.224, server: id1.dsimlife.com, request: "POST /api.php?f=getWorkplace HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"
2023/03/20 00:34:56 [error] 487375#0: *288 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.70.147.134, server: id1.dsimlife.com, request: "POST /api.php?f=getCompanyWarehouse HTTP/1.1", upstream: "fastcgi://unix:/usr/local/apps/php74/var/fpm-dsimlife.sock:", host: "id1.dsimlife.com"

And here is based on my htop

htop

I really appreciate any answers regarding, I have been figured out for almost 8 hours and there is no change. I also use the calculator here: https://spot13.com/pmcalculator/ [which indicates how much to set php-fpm based on our server and script usage] but it is still does not work.

vidarlo avatar
ar flag
You will have to check your logs. You don't include enough information for any guesses from us...
Stuart William avatar
cv flag
which log to check?
vidarlo avatar
ar flag
Access log and error log is a good place to start
Stuart William avatar
cv flag
added for error log, anyway I am trying to find out what does "WARNING: [pool dsimlife-user] child 502348" means. Does the script would be terminated?
Jaromanda X avatar
ru flag
is that a http 521 error? if so https://http.dev/521
Stuart William avatar
cv flag
Sure 521 error, I am unsure about that but I checked the SSH it works fine.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.