Problem is, the HTTP client times out after 5s.

When you say that the client times out, what exactly is timing out?

A client async_read operation, async_write? Is the server simply dropping your connection because of inactivity?