You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Steve Short <St...@PostX.com> on 2002/04/18 01:22:19 UTC

Exceptions Using MYSQL Database for Spool

Hi folks,

I'm trying to do some performance comparisons of using filestore versus
database for the main spool queue, and when I use a database, I keep getting
exceptions like the one below.  Having turned logging up to debug it looks
to me like this message has already been processed and sent, so my guess is
that it has been picked up from the spool queue by a second thread before
JamesSpoolManager deletes it from the spool.  I thought that
JDBCMailRepository locked this entry so this should not be possible, but
then I'm not sure how good the locking mechanism is.  (I notice that the
AvalonMailRepository lock() method has a notifyAll which is commented out in
JDBCMailRepository lock()).

Is anyone else seeing this error?  

Regards
Steve

2002-04-17T16:20:10 INFO  [James.Mailet   ]: RemoteDelivery: Remote delivery
thread (2) will process mail Mail1019085596655-19-!1366124276-to-postx.com
java.lang.RuntimeException: Did not find a record
Mail1019085596194-13-!1515491097 in spool
        at
org.apache.james.mailrepository.JDBCMailRepository.retrieve(Unknown Source)
        at org.apache.james.transport.JamesSpoolManager.run(Unknown Source)
        at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
        at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
5)
java.lang.RuntimeException: Exception while retrieving mail: Did not find a
record Mail1019085596194-13-!1515491097 in spool
        at
org.apache.james.mailrepository.JDBCMailRepository.retrieve(Unknown Source)
        at org.apache.james.transport.JamesSpoolManager.run(Unknown Source)
        at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
eRunnable.java:47)
        at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
5)


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Exceptions Using MYSQL Database for Spool

Posted by Serge Knystautas <se...@lokitech.com>.
Yes, I see this error, but it continues gracefully so I haven't bothered 
to figure out exactly how this is happening.  There is locking going on, 
but somehow it does slip through the cracks somehow and multiple threads 
get told to handle the same message.

However, I never see a "doubley" processed message, so I think maybe 2 
threads are incorrectly told they can work on a message, but then the 
locking makes sure only 1 processes it.  So then this exception happens 
when the 2nd thread gets a chance to work on it, but it's already been 
processed.
-- 
Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/

Steve Short wrote:
> Hi folks,
> 
> I'm trying to do some performance comparisons of using filestore versus
> database for the main spool queue, and when I use a database, I keep getting
> exceptions like the one below.  Having turned logging up to debug it looks
> to me like this message has already been processed and sent, so my guess is
> that it has been picked up from the spool queue by a second thread before
> JamesSpoolManager deletes it from the spool.  I thought that
> JDBCMailRepository locked this entry so this should not be possible, but
> then I'm not sure how good the locking mechanism is.  (I notice that the
> AvalonMailRepository lock() method has a notifyAll which is commented out in
> JDBCMailRepository lock()).
> 
> Is anyone else seeing this error?  
> 
> Regards
> Steve
> 
> 2002-04-17T16:20:10 INFO  [James.Mailet   ]: RemoteDelivery: Remote delivery
> thread (2) will process mail Mail1019085596655-19-!1366124276-to-postx.com
> java.lang.RuntimeException: Did not find a record
> Mail1019085596194-13-!1515491097 in spool
>         at
> org.apache.james.mailrepository.JDBCMailRepository.retrieve(Unknown Source)
>         at org.apache.james.transport.JamesSpoolManager.run(Unknown Source)
>         at
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
> eRunnable.java:47)
>         at
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
> 5)
> java.lang.RuntimeException: Exception while retrieving mail: Did not find a
> record Mail1019085596194-13-!1515491097 in spool
>         at
> org.apache.james.mailrepository.JDBCMailRepository.retrieve(Unknown Source)
>         at org.apache.james.transport.JamesSpoolManager.run(Unknown Source)
>         at
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Executabl
> eRunnable.java:47)
>         at
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:8
> 5)
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>