I'm still experiencing the exact same problem, even after having installed the latest updates (Plesk 11.5.30 MU#16). I've just increased the buffer sizes in the file "/etc/sw-cp-server/config" to:
fastcgi_buffers 64 64k;
fastcgi_buffer_size 128k;
Restarted both "sw-cp-server" and "sw-engine".
I'm still getting the "502 bad gateway" error randomly when exporting a database. In /var/log/sw-cp-server/error_log:
2013/09/26 09:52:18 [error] 25684#0: *203 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: , request: "POST /domains/databases/phpMyAdmin/export.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "xxx.xxx.xxx:8443", referrer: "https://xxx.xxx.xxx:8443/domains/databases/phpMyAdmin/db_export.php?db=xxx&server=1&token=9c70d142a038d8884a5b73aec7f22552"