אני מקבל שגיאת 502 כשמנסה למחוק נושאים שנוצרו על ידי משתמש ספציפי

This can obviously go wrong. 300000 posts is not a small number, you can’t load them into memory at once.