Comment out default values instead of not writing.
Make get_free thread-safe.
Use persistent HTTP connections.

Remove server, since that was a misdiagnosis of the problem.