Improve error handling, limit HTTP connections