Debugging MySQL connection problems

2011-03-14
2013-01-23
  • Simon Hobson

    Simon Hobson - 2011-03-14

    I know it's a little off topic, but I figure people here should be able to point me in the right direction.

    I've a cluster of machines, one of which hosts the mail store, the other two mount this via NFS. All of them share a fourth backend machine running the database. All three frontends do before-queue scanning via Amavis, and use Policyd (aka Cluebringer, and also running on the backend) as a policy daemon as well. Only the machine with the mailstore runs on bare metal, the rest are Xen guests.

    I've been looking into why the mail throughput is rather poor now I;ve switched a Mailman list server to send via these machines, and I;ve found errors in the Postfix logs on the three frontends :

    fatal: mysql:/etc/postfix/sql/mysql_relay_domains_maps.cf(0,lock|fold_fix): table lookup problem

    It's not always mysql_relay_domains_maps.cf, it can fail on the other lookups as well. The process reporting the error can be postfix/smtp, postfix/qmgr, postfix/error, postfix/trivial-rewrite.

    To me this points towards there being an intermittent problem with the backend database - or more likely the client unable to communicate with the backend for some reason. Does anyone have any pointers or tips on where to look, what to look at ?
    So far I've increased max_connections so it's not that - but I fairly certain it is load related.

     
  • GingerDog

    GingerDog - 2011-03-14

    Try putting 'proxy:' infront of them within the Postfix config file (e.g. virtual_host_maps = proxy:mysql:…. ) - this normally improves performance at least.

    At a guess, you're running out of database connections, which the proxy: thing may help with…..

    David.

     
  • Simon Hobson

    Simon Hobson - 2011-03-14

    Rather odd - the problem persisted (though not as badly) after the mailshot had finished. I recall having had proxy: in there before (still had the config lines commented out) but took them out for some reason I can't remember now. It starts with proxy: present, so I'll see what difference it makes.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks