NGINX – client intended to send too large body

Going through syslogs I’ve noticed few errors like the one below:

2015/03/03 17:32:27 [error] 11622#0: *2047 client intended to send too large 
body: 1049196 bytes, client: 1.2.3.4, server: subdomain.example.com, request: 
"POST /?/Upload/&s=/_lRQBXpfsulxyH8IKKNAkjcKy5NSC./ HTTP/1.1", host: 
"subdomain.example.com", referrer: "https://subdomain.example.com/"

The error is presented because a request being sent to the server contains more data than Nginx allows by default. You can increase the allowed maximum with the client_max_body_size attribute.

You can add the client_max_body_size attribute to your configuration files in multiple places to control what sites or locations the attribute affects. For example, you can add it to your main config file to ensure than any site can upload the value you set.

/etc/nginx/nginx.conf

http {
 ....
 client_max_body_size 100M;
 ....
 }

You could also add it inside the server { tags of an individual site, or even the location { tags of a specific location.

then:

service nginx reload

LINUX – Nginx – exited on signal 11 error

After compiling NGINX 1.7.7 I started getting this error:

2014/11/27 22:10:27 [alert] 8326#0: worker process 8730 exited on signal 11
2014/11/27 22:10:27 [alert] 8326#0: worker process 8731 exited on signal 11
2014/11/27 22:10:28 [alert] 8326#0: worker process 8728 exited on signal 11
2014/11/27 22:10:28 [alert] 8326#0: worker process 8732 exited on signal 11
2014/11/27 22:10:28 [alert] 8326#0: worker process 8733 exited on signal 11
2014/11/27 22:10:29 [alert] 8326#0: worker process 8735 exited on signal 11

quick web search pointed me to: http://trac.nginx.org/nginx/ticket/235

The solution is quick, edit:

/etc/nginx/nginx.conf

and add the following line:

ssl_session_cache    shared:SSL:10m;

then restart nginx service

dovecot: lmtp(): Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given

I was reconfiguring Postfix to include SpamAssassin, ClamAV and Sieve and somehow I managed to break something 🙂
Emails began to stuck up in queue and /var/log/mail.err was showing:

dovecot: lmtp(5680): Fatal: Error reading configuration: Invalid settings: postmaster_address setting not given

After some research on DuckDuckGo I found the fix:

 nano /etc/dovecot/conf.d/20-lmtp.conf

and add

 protocol lmtp {
 postmaster_address = postmaster@domainname # required
 mail_plugins = quota sieve
 }

then restart postfix and dovecat and we are back in action again.

Some reference here