atx-crypto-club / atxcf

atxcf bot
MIT License
6 stars 3 forks source link

Fix webapi slowness and crashing #8

Open transfix opened 8 years ago

transfix commented 8 years ago

After enough requests (not many, just load http://catx.io and keep it open), the webapi dies a horrible death from what looks like a memory leak or something- maybe too many persisting references?... Need to look into it but it introduces some interesting scaling problems early so I might work that end first before fixing this. A fun workaround before actually fixing the issue would be to have price data persist in a database and also have remote price sources working so we could keep killing and respawning new webapi processes and have the javascript catx.io front end round robin requests to each. That implies that we need to keep a registry of known running webapi processes though...

transfix commented 8 years ago

Presumably this also affects the slack bot (agent.py) but we don't have the volume of requests required to see this bug in that use case.

transfix commented 7 years ago

Things are a lot better now with memcached and settings module improvements. And we are now using tornado to render the front page directly in Python. But the full API that is present on the current catx.io site isn't fully implemented yet... coming very soon. Anyway that thing was just to get something up there. Amazingly slow pile of hacks, it is.