PostgreSQL writes very slow

I have a flask webapp with a PostgreSQL database. Since there’s no command-line interface in the free tier, I created a route that initializes the database and adds dummy data. However, this takes a very long time to run (and eventually times out). The same request takes a couple of seconds to run locally.

These are the logs on my PostgreSQL instance:

The request doesn’t show up on the web application logs.

Any ideas on what the issue could be? Deploying a new commit also takes 20-30 minutes.

Hi @moinmir,

If you are seeing the same request complete very quickly locally, it may be helpful to add some more logging. It’s possible that it’s getting stuck on a specific process that might require more troubleshooting.

Unfortunately, deploys on free tier are generally slower due to the amount of resources available to them. I am seeing, however, your more recent builds are ranging more from 4-15 minutes. Are you still noticing slowness on this front?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.