502 Bad Gateway on "Create Newsletter"

The URL under "Create Newsletter" (/wp-admin/admin.php?newsletter_builder_action=create_newsletter) redirects to /wp-admin/customize.php?wp_customize=on&theme=Handwritten&newsletter_id=24&return=admin.php%3Fpage%3Dnewsletters

This results in a 502 Bad Gateway quickly, meaning it's not a timeout and not a problem with PHP5-FPM pool either. All other pages load fine. How to debug this?