I’m not entirely sure if I’m using this program/information correctly, but, after running OpenFire 3.4.5 for probably a week or two without restarting, lots of stuff on my FreeBSD 6.2 system start slowing down a bit. I was looking around for open files, stumbled upon the fstat command, and gave it a cursory wc -l to see how many entries there were. I had about 41k rows in the output. I checked again and 39k of those are the java process on the box running OpenFire. Just about all of those rows were of the type “internet stream tcp”, so I’m assuming it’s some sort of network connection/socket that’s open. At the time I had about 75 users online, around 80 or so active IM transport accounts, and perhaps 10 or 20 s2s connections. I also confirmed these active connections with netstat.
Anyway, as an experiment, I killed the server just a few minutes ago and checked the fstat output again. It dropped down to about 1.5k entries, which seem reasonable for a general purpose server with several web clients. When I restared OpenFire, and began checking the fstat output all along the way, it seemed to start with only 80 open files. A few seconds later, 150. Then 300. Then 1500. And so on and so forth, up and up, seemingly without end. They do fluctuate just a little bit, but after the server has been running for approximately 10 minutes, I’m at 11.7k open files all belonging to the java process running OpenFire. About half of those are the “internet stream tcp” type, wth the rest mostly being pipes.
Is this normal, or is this unusual? I think fstat on FreeBSD is similar to lsof on other systems, basically giving you a list of open files (which includes devices and such in the *nix world, of course). It just seems tremendously excessive at first glance. Could anyone happen to provide a little insight, and if it’s a bug, a nice fix? Thank you!
Oh, system info:
Sun JRE 1.5.0_07
PostgreSQL 8.2.5 back-end