Dear all,
I have found an interesting problem regarding Glassfish 2.1. There already was some debate as to Glassfish instances suddenly disappearing, but this seems to be a new case of the problem, this time provoked by frequent SMTP requests.
[i]Server parameters:[/i] Sailfin using Glassfish 2.1.
[i]Java version:[/i] 1.6.0 update 19.
[i]DB:[/i] MySQL 5
[i]OS:[/i] Ubuntu Linux, Karmic Koala.
[i]SMTP server:[/i] remote, authenticated (there is no SMTP running on localhost).
[i]Detailed description:[/i]
I have a SIP application running on Sailfin (that is, Glassfish 2.1 plus some SIP servlets). The whole server crashes (absolutely uncleanly: no indication of reason, it just disappears from the process list and stops responding), under specific circumstances[/b].
The [b]specific circumstances[/b] are as follows: there is some code within the servlet which attempts to send about 10-20 e-mails in a very short span of time (under 0.5 second), plus logs as many lines into a log database. The e-mails are intended to alert system administrator about some untypical conditions of the environment, but they are sent way too often.
- If I provoke the servlet into sending about 10-20 of them, the server crashes.
- If I comment out the provoking e-mail-related code, the problem seems to disappear - it seems to be somehow connected to sending of many e-mails via remote SMTP serve.
So I think the problem is in Glassfish proper, and not in the Sailfin extensions.
Nevertheless, the big question is how the server (which is expected to serve as a SIP VoIP central for thousands of users) will behave under bigger load, where frequent sending of e-mails may be perfectly legal.
User Monzillo posted a TrapExit.war package here a month ago, to detect whether some part of the application code calls for System.exit(). I followed his advice and it seems that the crash is not caused by anyone invoking System.exit(); it rather seems to be a crash of the entire JVM.
Nothing in the server.log points to any possible problem. Logs as normal, then abruptly stop. Logs in jvm.log continue, then the last line is cut in half. No core dumps anywhere (maybe I just need to enable them somehow?)
Do you have any idea what's going on?
Best regards
Marian Kechlibar
[Message sent by forum member 'mkechlibar']
http://forums.java.net/jive/thread.jspa?messageID=397738