Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7909117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:15:57+00:00 2026-06-03T12:15:57+00:00

I have some error with subj. Server doesn’t high loaded: ~15% CPU, there are

  • 0

I have some error with subj. Server doesn’t high loaded: ~15% CPU, there are several Gb of memory, HDD is not buisy. But error 502 throws approximately in 3% of cases.

Programs: Debian 6, nginx/0.7.62, php5-fpm (5.3.3-1).

In error.log of nginx is this error:

connect() to unix:/var/run/php5-fpm.sock failed

State of php5-fpm usually like this:

accepted conn:   41680
pool:             www
process manager:  dynamic
idle processes:   258
active processes: 1
total processes:  259

I think, this mean loading is not high.

I have increased backlog params: in sysctl – net.core.somaxconn = 5000, in php-fpm pool – listen.backlog = 5000. No effect.

I quote a configuration:

/etc/nginx/nginx.conf

user www-data;
worker_processes  8;
timer_resolution 100ms;
worker_rlimit_nofile 20240;
worker_priority -5;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  2048;
    use epoll;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;

    access_log  /var/log/nginx/access.log;

    sendfile        on;
    tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    gzip_min_length 1100;
    gzip_buffers 64 8k;
    gzip_comp_level 3;
    gzip_http_version 1.1;
    gzip_proxied any;
    gzip_types text/plain application/xml application/x-javascript text/css;
    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

    client_max_body_size 100M;
    server_tokens off;
}

/etc/nginx/php_location

fastcgi_pass   unix:/var/run/php5-fpm.sock;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
fastcgi_buffers 256 128k;
#fastcgi_buffer_size 16k;
#fastcgi_busy_buffers_size 256k;
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
include fastcgi_params;

php-fpm pool

[www]
listen = /var/run/php5-fpm.sock
listen.backlog = 5000
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
user = www-data
group = www-data
pm = dynamic
pm.max_children = 1024
pm.start_servers = 64
pm.min_spare_servers = 64
pm.max_spare_servers = 128
pm.max_requests = 32000
pm.status_path = /system/php5-fpm-status
slowlog = /var/www/log/php-fpm.log.slow
chdir = /var/www

What can I do to optimize this system and make this use all server resources?

PS. I’m sorry, my english is bad.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T12:15:58+00:00Added an answer on June 3, 2026 at 12:15 pm

    The issue is socket itself, its problems on high-load cases is well-known. Please consider using TCP\IP connection instead of unix socket, for that you need to make these changes:

    • in php-fpm pool configuration replace listen = /var/run/php5-fpm.sock with listen = 127.0.0.1:7777
    • in /etc/nginx/php_location replace fastcgi_pass unix:/var/run/php5-fpm.sock; with fastcgi_pass 127.0.0.1:7777;
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some custom error classes defined, each with their own functionality (not shown):
I have to debug some error that is db related and have been continuously
I have some code in my error handler I need to test against a
I have some code which handles data files and reports an error when it
I have writen some code in VBA (Excel) with error handling labels. It worked
Due to a prinitng error in some promotional material I have a site that
I have been helping someone debug some code where the error message was Day
For some reason I am getting the error No database selected I have no
I have a class that raises an event with an error message. In some
I have some error in logcat but i dont know how to identify it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.