Change Nginx keepalive_requests


I have installed “sudo bash --apache no --phpfpm yes --multiphp yes --vsftpd yes --proftpd no --named yes --mysql yes --postgresql no --exim yes --dovecot yes --sieve no --clamav yes --spamassassin yes --iptables yes --fail2ban yes --quota no --api yes --interactive yes --with-debs no --port ‘8083’ --hostname” on Ubuntu

I wanna change keepalive_requests because when i upload image to wordpress i have:
"recv() failed (104: Connection reset by peer) while reading response header from upstream, client "

Can someone tell me where can i find keepalive_requests ?

Thank you

/etc/nginx/nginx.conf ?

Yes eris,

You are right. But sadly keepalive_requests 200000; are high and i still got that error from time to time when i upload pictures in wordpress.
Php memory limit is to 3072M

“Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploaded a smaller image may help. Suggest maximum size is 2500 pixels.”

Any ideea what could cause this error?
Thank you in advance