MMSC stuck due to EMFILE Error

MMSC stuck due to EMFILE Error SearchSearch
Author Message
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 155
Registered: 01-2007
Posted on Monday, April 27, 2026 - 02:37 pm:   

Hi ,
we did have a trouble on our Production MMSC.
we start having error ;

Shutdown triggered by System Error fileOpen-EMFILE
following with a restart

screenshot

the results was a very long delay between sending and receiving the MMS.

due to that , i guess we had some alarms on MM4 side and also "Retry Pending - ERROR: TCP/IP Error sending data to server" for SMSOUT entry type



currently ( with trafic OK ) we have this value ,
root@xxxxxxxx:~# lsof | grep NowSMS | wc -l
50032
cat /proc/sys/fs/inotify/max_user_watches
====> 123574

cat /proc/sys/net/ipv4/tcp_max_orphans
==>65536

so i did restart some times , until situation was recovered.

is there any limittion regarding the number of open files on the application ? how can we increse it ?
do you have an idea of what happen ?

don't hesitate to contact me if you need more detailed parameters.
Note that once couple of restart of NowSMS service , the trafic did going back to normal

have a nice day
Br
Marc
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 8612
Registered: 10-2002
Posted on Monday, April 27, 2026 - 10:39 pm:   

Hi Marc,

The default number of open files/sockets allowed is usually 1024, which should be sufficient in almost all cases. Use he command ulimit -a to check the current limit and use the command ulimit -n 4096 to increase the limit to 4096 as a precaution.

Our behavior when encountering this error is to assume that there is a programming fault is leaking handles, and to do a graceful shutdown and restart to avoid prolonged instability.

Let's try increasing the limit to 4096 and monitor for reoccurrence. If it reoccurs, there is a debug log parameter that I will need to supply you that regularly reports the number of open files/sockets to aid in troubleshooting.


Regards,


Bryce


and restart to avoid
marc bazimon
Frequent Contributor
Username: Marc_orange

Post Number: 156
Registered: 01-2007
Posted on Tuesday, April 28, 2026 - 02:58 pm:   

Hi Bryce ,
Thanks for your feedback ,
Since yesterday , situation did become normal ,

i increase the open files parameter , to 4096 , should i have to do on root user also ?

in order to see openfiles , i was using this command , but viewing the results i guess this is not accurate ?
root@xxxxxx:~# lsof | grep NowSMS | wc -l
38988


have a nice day ,
Br
Marc

Add Your Message Here, or click here to start a new topic.
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image
Options: Automatically activate URLs in message
Action: