I have a facebook app running on a shared hosting.
1.5% of my requests end as a 500 “Premature end of script headers” error.
I already got the same problem with other sites using cUrl connexions.
I suspect the server to kill my scripts when facebook is a bit too long to answer some queries (FB response time for my queries can range from 0 to 30 seconds).

Would it be a good idea to switch to a VPS to get rid of this timed out scripts killer as the application is growing quite fast ? (0 to 400k daily queries in one month, 400k queries means 6000 ending with a 500 error).

When I don’t end with a 500 error, pages seems to work fine on shared at the moment, with how many daily queries do you think I’ll begin to feel some pain on shared, the scripts memory load ranging from 1 to 3 Mb ?