Jerry M ha scritto:
I have asked previously about my recurring OutOfMemory errors. I
increased the heap (I think). But I see no change. The following is a
snippit from my connections log (log level set to WARN). I need a brief
education on how James works with these connections. These "IP"
connections and not "DB" connections that it's referring to, right?
Yes, socket connections.
Is
it normal to be a the max of 30 connections most of the time? Doesn't
seem right to me. I get a lot of inbound spam. But I doubt it's more
than anybody else. I wouldn't think with my small user set that my
inbound mail would certainly be maxing the absolute capability of JAMES.
Spammers and botnets. It is bad, I don't know if we can say it is
"normal". Spammers let us servers die, shit happens.
I see hundreds of concurrent connections from hundreds of different
spammer's IPs in my servers nowadays, so you're not alone (not sure this
helps you).
All you can do is reduce at minimum what james have to do with spam
mails: do not reply, do not save them, trash them from the root processor.
You can also decrease the timeouts: at least you don't hang connectiosn
to slow spammers.
You can increase the maximum number of connections (see the
<connections> configuration in config.xml).
Please note that increasing the number of connections may need tuning to
the db pool configuration.
This log snippit is from the last few hours. I could give you any log
for the past several months, and it would look the same. Max'd out on
connections for long periods, and OutOfMemory occurrances regularly.
OOM and maxed out connections are 99% unrelated.
If you use james 2.3.1 then OOM are mostly caused by big messages.
Looking at the pattern in the log, it looks like everything goes fine
for a while. Then max connections gets hit. After max connections,
it's only a matter of time before OutOfMemory. Then after a few of
those, it recovers for a period of time until the next round of max
connections and OutOfMemory errors.
I'm almost sure they are unrelated but I may be wrong: I never had an
OOM on my servers since 2.3.1 but I exaust connections more often than not.
During the several minutes each time while it's recovering from each
OutOfMemory, JAMES is pretty much locked up. The CPU is pegged at 100%,
and my clients can't send email (which is when I get yelled at....)
Please take a stack dump of james when you have 100% CPU: this is
interesting.
jstack <pid> if you have java 5+, or "kill -3 <pid>" (and look at
phoenix.console file) if you are on linux.
I am a Java programmer and can assist with whatever you recommend I try
in order to debug this. But I need a much better understanding of what
the code is doing before I want to simply start freelancing. (BTW..
it's James 2.3.1)
stack dumps and heap dumps on OOM would help.
You can configure the JVm to automatically create an heap dump on OOM
and you can analyze the content of your memory at that very point.
Can you see anything from this that tells you something that I may have
misconfigured? I guess I could increase the max connections. But this
looks more like something is preventing the existing connections from
being returned. So I suspect increasing the max count would simply just
slightly postpone the inevitable (I changed it from 20 to 30 a month or
so ago. No obvious effect).
What is your current jvm Xmx configuration?
Have you anything special or is it a default james 2.3.1?
Are you using file, db or dbfile repositories?
Stefano
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]