[ 
https://issues.apache.org/jira/browse/JAMES-799?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517903
 ] 

Stefano Bagnara commented on JAMES-799:
---------------------------------------

I'm not sure where you read that JAMES Server included mysql jdbc drivers. In 
config.xml I read:
------
JDBC driver .jar libraries for other RDBMS can be placed in ~james/lib/

You can download latest Connector/J from
http://dev.mysql.com/downloads/connector/j/3.1.html

Example, connecting to a MySQL database called "mail" on localhost

The max value is the maximum number of concurrent connections James will
open to this database
If you see "SQLException: Giving up... no connections available." in your
log files or bounced mail you should increase this value
---------

If you confirm that you have max=20 in the dbcp configuration and 10 
spoolthreads (you say you use default values) then I don't get how you can run 
out of connections.

Can you please try reducing the number of threads for the spool manager to 1 
and repeat the test?
Can you also test this configurations for the dbcp:
------
         <max>10</max>
         <max_idle>2</max_idle>
         <max_wait>60000</max_wait>
------
I'm used to change this from the default configuration in every installation, 
but they never landed our official config.

> dbcp causes "Address already in use: connect" exception and server fails
> ------------------------------------------------------------------------
>
>                 Key: JAMES-799
>                 URL: https://issues.apache.org/jira/browse/JAMES-799
>             Project: James
>          Issue Type: Bug
>          Components: MailStore & MailRepository
>    Affects Versions: 2.3.1
>         Environment: Windows XP, MySQL 4.1.22
>            Reporter: Amichai Rothman
>
> I've tried using FromRepository servlet (manual one-time configuration) to 
> migrate a file store with ~1.5K messages to a database store. however afte a 
> few hundred inserts, the logs started filling with exceptions, whose root 
> cause is "Address already in use: connect". After much investigation, I found 
> out using netstat that there are thousands of ports open (all local - both 
> JAMES and MySQL are on the same server), and as some googled post suggested, 
> the available TCP ports may have been exhausted. The result was that some of 
> the message never made it through the conversion - the logs showed that after 
> 3 db connection retries JAMES gave up on them.
> I tried lowering the number of threads in the db source configuration, spool 
> configuration, and default thread pool configuration (all in config.xml) but 
> nothing helped. Eventually, I reverted all my configuration attempts, and 
> applied the single change of using mordred instead of dbcp, and now 
> everything works fine. I don't know if this is a JAMES or a dbcp bug, but 
> it's definitely unacceptible for db connections to fail when there is a bit 
> of load on the system (a few hundred messages).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to