Yesterday when I shipped sending webmentions I ran into an error that didn't occur in development. Posting the webmention would work, but my response would timeout when trying to save content.

When updating a post you're supposed to send webmentions, update your content, then send webmentions again. As I'm trying to keep server requirements as simple as possible I'm doing all of the sending inline.

Looking at my logs what appeared to be happening was everything would just lock, then once my timeout occurred, I'd see my initial post request to Tanzawa come through, the timeout, and then Wordpress making a request to Tanzawa to retrieve it's mention.

This was happening because gunicorn only has 2 workers by default, which wasn't enough to handle processing a long request simultaneously with an incoming request. Increasing the workers from 2 to 4 solved the issue.