in reply to Re: Can Log4perl's DBI Appender be used in multithread?
in thread Can Log4perl's DBI Appender be used in multithread?

Guys thanks a lot for your input. I'll try to find a way to make log4perl get new connection during new threads. But meanwhile can anyone share the experience if he/she happened to meet the same issue or learned about the solution before?
  • Comment on Re^2: Can Log4perl's DBI Appender be used in multithread?

Replies are listed 'Best First'.
Re^3: Can Log4perl's DBI Appender be used in multithread?
by afoken (Chancellor) on Apr 14, 2011 at 09:38 UTC
    share the experience if he/she happened to meet the same issue

    Well, duh, mixing DBI and threads in the wrong way causes crashes, exactly those that you experienced. You are not alone.

    Do you feel better now?

    learned about the solution

    Create threads before calling DBI->connect(), as explained in the fine manual.

    I'll try to find a way to make log4perl get new connection during new threads.

    CHANGING DBH CONNECTIONS (POOLING) sounds promising.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)