Question

A lot of Worker_connection errors

Hi! Since few days, i have theses error messages in my log on Forge (linked to DigitalOcean) :

768 worker_connections are not enough while connecting to upstream, client: 3.14.219.42

My nuxt can’t anymore generate my app :

Client network socket disconnected before secure TLS connection was established

I don’t understand theses errors and I don’t know if they are related. Is my droplet not powerful enough?

Thanks a lot! Vincent


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
November 23, 2022

Hi @pit07,

The errors you are receiving do not specifically suggest that your Droplet needs more resources. You’ll need to increase.

If you are using Nginx,

The following settings relate to connections and how they are queued. If you have a high rate of incoming connections and you are getting uneven levels of performance (for example some connections appear to be stalling), then changing these settings can help.

net.core.somaxconn – The maximum number of connections that can be queued for acceptance by NGINX. The default is often very low and that’s usually acceptable because NGINX accepts connections very quickly, but it can be worth increasing it if your website experiences heavy traffic. If error messages in the kernel log indicate that the value is too small, increase it until the errors stop.

Note: If you set this to a value greater than 512, change the backlog parameter to the NGINX listen directive to match.

net.core.netdev_max_backlog – The rate at which packets are buffered by the network card before being handed off to the CPU. Increasing the value can improve performance on machines with a high amount of bandwidth. Check the kernel log for errors related to this setting, and consult the network card documentation for advice on changing it. File Descriptors File descriptors are operating system resources used to represent connections and open files, among other things. NGINX can use up to two file descriptors per connection. For example, if NGINX is proxying, it generally uses one file descriptor for the client connection and another for the connection to the proxied server, though this ratio is much lower if HTTP keepalives are used. For a system serving a large number of connections, the following settings might need to be adjusted:

sys.fs.file-max – The system‑wide limit for file descriptors nofile – The user file descriptor limit, set in the /etc/security/limits.conf file Ephemeral Ports When NGINX is acting as a proxy, each connection to an upstream server uses a temporary, or ephemeral, port. You might want to change this setting:

net.ipv4.ip_local_port_range – The start and end of the range of port values. If you see that you are running out of ports, increase the range. A common setting is ports 1024 to 65000.

More about that here:

https://www.nginx.com/blog/tuning-nginx/

Hi @pit07,

Not quite enough info to say definitively, have you increased the number of worker_connections?.

Can you share the block content where you’ve set proxy_set_header and proxy_redirect directives?

Cheers,

Sergio Turpín