Robin Bowes wrote:

The idea is, I create the MySQL connection + prepare the statement
handle just once in init() so I only need to execute the prepared
statement in the queue_post hook.

This works for the first message received, but not for subsequent messages.

Any idea why? Is my concept flawed, i.e. is it not possible to maintain
persistent DB connections between messages?

Thanks,

R.

I would imagine it's not a problem of maintaining connections between messages, but rather a problem of maintaining connections between processes. Did you try sending two messages in the same connection? It would also be interesting to see if it worked in trunk, where it's possible to function without forks.

Reply via email to