Closed berekuk closed 2 years ago
Increasing dyno size is ok as a hotfix, yes.
After some investigating:
I'm running updates by hand on my machine for now (everything from 9=polymarket).
polymarket-fetch uses around 260MB if run by itself
This number is hard to bring down for now due to how platform fetchers are currently implemented (load all data in memory and then insert everything to the DB).
So I enabled pro dynos on heroku and changed the main cron job to use Standard-2X, that should be enough. It shouldn't be as bad as $50/month just for that, since Heroku charges only for a fraction of time the dyno runs, so might be around $10/month or so.
Received, seems ok for now.
I reworked the polymarket fetcher. It should be significantly less memory intensive now. In particular, we were fetching all markets (including resolved ones), which wasn't necessary. I've reverted the change and we are now using free dynos, but feel free to restore them.
Oh, great. Btw, are https://strapi-matic.poly.market/markets query parameters documented anywhere, or are you just reverse-engineering urls from https://polymarket.com/? I couldn't find anything useful on google.
Both. There is a devs channel on the polymarket Discord on which this is kinda-but-not-really documented. In this case, I did reverse engineer the parameters.
Seems fine now (cronjob broke today on algolia step due to misconfiguration, sorry; but I see in logs that you've already fixed that).
latest.combined
haven't updated since 26th:Logs:
(it also failed today due to .js/.ts misconfiguration, but I fixed that already)
I'm looking into ways to optimize the memory usage now, but we might also want to increase the dyno size on Heroku in the meantime?