Diego,
That was it. We ran the JVM in debug mode and discovered that most of its threads were deadlocking in "mordred" classes.
Mordred is aptly named. Good riddance. It should be not only deprecated, but completely removed from the James code base. We would much rather have discovered this while upgrading and configuring 2.2 rather than getting killed by a time bomb two months later. This has cost us dearly.
Thanks to all for the help.
Nathan
Diego Castillo wrote:
Hello Nathan,
You seem to have run out of JDBC connections. I have experienced similar problems when my JDBC connections expire. James does not restart them and it simply hangs after a while.
This is what I would do: 1. Restart your server. 2. Defragment your MySQL queues periodically via crontab: 0 * * * * /usr/local/mysql/bin/mysql -uXXX -pXXX -Dmail -e"OPTIMIZE TABLE spool" 3. Replace Mordred by DBCP: org.apache.james.util.mordred.JdbcDataSource
Hope this helps,
Diego
-----Message d'origine-----
De : Nathan Cheng [mailto:[EMAIL PROTECTED] Envoy� : mardi 21 d�cembre 2004 02:32
� : James Users List
Objet : Re: i need help urgently
It all started with this error in the spoolmanager log:
17/12/04 14:02:06 ERROR spoolmanager: Exception in processor <transport>
javax.mail.MessagingException: Exception caught while storing mail
Container: java.io.IOException: java.sql.SQLException: Giving up... no connections available.
at
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailReposit
ory.java:764)
at
org.apache.james.mailrepository.JDBCSpoolRepository.store(JDBCSpoolRepos
itory.java:238)
at
org.apache.james.transport.LinearProcessor.service(LinearProcessor.java:
438)
at
org.apache.james.transport.JamesSpoolManager.process(JamesSpoolManager.j
ava:451)
at
org.apache.james.transport.JamesSpoolManager.run(JamesSpoolManager.java:
360)
at java.lang.Thread.run(Thread.java:534)
17/12/04 14:02:06 ERROR spoolmanager: An error occurred processing
Mail1103309206722-118542 through transport
17/12/04 14:02:06 ERROR spoolmanager: Result was ghost
No connections available, eh? What is wrong with these settings:
...
<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>org.gjt.mm.mysql.Driver</driver>
<dburl>jdbc:mysql://newco-prod-db/mail?autoReconnect=true</dburl>
<user>xxxxxxx</user>
<password>xxxxxxx</password>
<max>100</max>
</data-source>
<data-source name="newcodb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>org.gjt.mm.mysql.Driver</driver>
<dburl>jdbc:mysql://newco-prod-db/newco?autoReconnect=true</dburl>
<user>xxxxxxx</user>
<password>xxxxxxx</password>
<max>100</max>
</data-source>
...
<connections> <idle-timeout>300000</idle-timeout> <max-connections>100</max-connections> </connections>
...
<thread-manager> <thread-group> <name>default</name> <priority>8</priority> <is-daemon>false</is-daemon> <max-threads>100</max-threads> <min-threads>20</min-threads> <min-spare-threads>20</min-spare-threads> </thread-group> </thread-manager>
And here is this:
mysql> select count(*), message_state from spool group by message_state; +----------+---------------+ | count(*) | message_state | +----------+---------------+ | 41 | error | | 5903 | root | | 99 | spam | | 32 | transport | +----------+---------------+ 4 rows in set (0.55 sec)
... 2 minutes pass ....
mysql> select count(*), message_state from spool group by message_state; +----------+---------------+ | count(*) | message_state | +----------+---------------+ | 41 | error | | 5903 | root | | 99 | spam | | 32 | transport | +----------+---------------+ 4 rows in set (0.58 sec)
... 10 minutes pass ....
mysql> select count(*), message_state from spool group by message_state; +----------+---------------+ | count(*) | message_state | +----------+---------------+ | 41 | error | | 5889 | root | | 99 | spam | | 59 | transport | +----------+---------------+ 4 rows in set (0.56 sec)
... 1 minute passes ...
mysql> select count(*), message_state from spool group by message_state; +----------+---------------+ | count(*) | message_state | +----------+---------------+ | 41 | error | | 5889 | root | | 99 | spam | | 60 | transport | +----------+---------------+ 4 rows in set (0.56 sec)
... 3 minutes pass ...
mysql> select count(*), message_state from spool group by message_state; +----------+---------------+ | count(*) | message_state | +----------+---------------+ | 41 | error | | 5885 | root | | 99 | spam | | 65 | transport | +----------+---------------+ 4 rows in set (0.55 sec)
THANKS!
Nathan
Nathan Cheng wrote:
We have been using James for over a year to provide email to our customers. Off and
on we have had really bad problems that we have been able to deal with
by either
upgrading to the latest James or tinkering with the config.xml for several days. We
now have several hundred users who depend on our email to run their day-to-day
businesses, and James has once again started to fail miserably. We do not have time
any more to tinker around in the dark with config.xml.
We need help from someone who knows James much better than whoever
wrote
the documentation knows James. Please help.
If you are qualified, please contact me by email at [EMAIL PROTECTED]
Here are the symptoms:
As of early Friday morning James had been working fine for a couple months, sending
and receiving on the order of 10's of thousands of emails per day.
Then
something happened. I don't know what happened. It may have been that were
several
hundred more
messages sent than usual. But anyway, something happened, and James decided not to work
any more. It would allow POPping about 50% of the time, it would claim
to fail when sending an email through SMTP, but then about 25% of the time actually
send the message
several hours later. It continued like that throughout the weekend. After fiddling with
it for a while today, and blocking our web application from reaching
the
mail server using iptables (so that only people using their own email clients
could
access it),
I actually got it to send several thousand spooled emails over the period of about an
hour. Then, without warning, it stopped again--with about 6000 emails left in the
'root' message_state and 11 in 'transport'. Our web application has another 1000 mails
or so queued up that it's trying to send (but can't thanks to
iptables).
So we're behind about 7000 emails and we've got several hundred angry clients.
As I said, please help.
Thank you,
Nathan
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
