by wilsonic
I’m consistently getting “upstream request timeout” when using MCP execute_sql and apply_migration for very simple DELETE operations.
Simple SELECT queries return quickly (<1s).
DELETE by a single ID sometimes works, but often times out.
Small batch DELETEs (even 5–7 rows) almost always time out.
apply_migration also times out on the same DELETE statements.
Error: {"error":{"name":"Error","message":"upstream request timeout"}}
I’ve confirmed there are no foreign key references blocking these deletes.
The user is experiencing 'upstream request timeout' errors when using MCP execute_sql and apply_migration for DELETE operations. Simple SELECT queries work quickly, but DELETE operations often time out, even for small batches. The user has confirmed no foreign key issues are causing the problem.
What happens if you do the delete in the SQL editor. You can also run explain analyze on it there. You can check the query performance report and see if it is showing up there. This should help sort if MCP or just the query. Without knowing all your FK's and linked tables hard to guess how fast a delete will run.