Sequelize on Cloudflare Workers is indefinitely hanging
Sequelize seems to indefinitely hang on Cloudflare Workers with no error messages. Does anyone know if there is a workaround or if it's just not compatible?
I've already set the following in my wrangler.toml
1 Reply
are you trying to use it with cloudflare's D1? or an external provider
also, are you initializing the database in the global scope or in the first request? In workers, initializing things that require external services in the global scope is ill-advised
if you haven't already, also look into using hyperdrive if possible. I haven't used it myself since I just use D1, but it might come with some improvements to connecting to databases from workers that you may find worthwile.
I should note that I have never used Sequelize and know very little about it. If they have a community server, it might be worthwile to ask there too if anyone has had success running it on workers