Endpoint Security Complete

 View Only

Mobility Suite Email Proxy Errors when using Work Mail (Too many open files) 

Oct 25, 2016 04:48 PM

If errors occur in the Mobility Suite Email Proxy's "/usr/local/nginx/logs/error.log" file that mention "accept4() failed (24: Too many open files)", then the following steps can be followed to resolve this issue:

 

Change the configurations

1. Type the below command and all those that follow from the Linux Terminal on the Email Proxy as the "root" user:

vi /etc/sysctl.conf

ProxyA1.png

2. Scroll through and search for the line "fs.file-max" or add it to just before the "# End Of File" if it does not exist and press "i" to change the value from its current limit to "fs.file-max = 99999".

ProxyA2.png

3. Hit the "Esc" key and type ":wq" to save and quit out of the file.

ProxyA3.png

4. Type the following command:

vi /etc/security/limits.conf

ProxyA4.png

5. Using "i" edit an existing limit or make a new limit for the "symc-proxy" user (The user that was created during secure proxy installation) to resemble the below example:

symc-proxy          soft          nofile          25000
symc-proxy          hard          nofile          50000

ProxyA5.png

6. Hit the "Esc" key and type ":wq" to save and quit out of the file.

ProxyA6.png

7. Type the below command to reload the changes that were made to the "sysctl.conf" file and ensure the "fs.file-max" entry was properly saved:

sysctl -p

ProxyA7.png

8. Type the below command:

vi /usr/local/nginx/conf/nginx.conf

ProxyA8.png

9. Scroll through and search for the line "worker_rlimit_nofile" and press "i" to change the current value to "worker_rlimit_nofile 50000;"

ProxyA9-1.png

ProxyA9-2.png

10. Hit the "Esc" key and type ":wq" to save and quit out of the file.

ProxyA10.png

11. Type the following command to restart the "nginx" service:

service nginx restart

ProxyA11-1.png

ProxyA11-2.png

The "Too many open files" error should be resolved upon completion of the above steps.

 

Check the configuration changes

Once the above steps have been completed, the output of the commands outlined in steps "6" and "7" listed below as the "symc-proxy" user will show if the limits have been changed successfully:

1. Navigate to the "/home/" directory:

cd /home/

ProxyB1.png

2. Create a directory for the "symc-proxy" user (The user that was created during secure proxy installation):

mkdir symc-proxy

ProxyB2.png

3. Change the ownership of the "symc-proxy" directory to the "symc-proxy" user and its group:

chown symc-proxy:symc-proxy symc-proxy

ProxyB3.png

4. Change the bash shell to the "symc-proxy" user (It is alright if the output is "Shell not changed"):

chsh -s /bin/bash symc-proxy

ProxyB4-1.png

ProxyB4-2.png

5. Change to the "symc-proxy" user:

su - symc-proxy

ProxyB5.png

6. Check the user's hard resource limit:

ulimit -Hn

ProxyB6-1.png

ProxyB6-2.png

7. Check the user's soft resrouce limit:

ulimit -Sn

ProxyB7-1.png

ProxyB7-2.png

If the output shown in steps 6 and 7 match what was configured in the initial step 5, then the modifications were a success and the "Too many open files" error should no longer persist.

 

Optional

In order to return back to the "root" user the following command can be run:

exit

ProxyO.png

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.