Occasional "Query failed" with LAMP to MSSQL 2000 server on intensive queries
David Horman <david.horman <at> odf-limited.com>
2015-03-19 15:47:03 GMT
Apologies in advance if this is a bit vague - I'm not expecting anyone
to be able to figure out what's going on from the following description,
I'm really looking more for advice on how to investigate further.
For the last few years I've been happily using FreeTDS to query an
ageing SQL Server 2000 server using PHP scripts running on a Centos 6
server. Recently, though, the amount of data I've been working with, and
the number of complex queries, has increased to the point where I
sometimes see long-running, intensive queries failing after
approximately (but this is not a firm measurement) a minute with the
PHP Warning: mssql_query(): Query failed in [script_name] on line 131
Warning: mssql_query(): Query failed in [script_name] on line 131
Then, it seems, any further queries attempted shortly after in the same
script fail with, for example:
Warning: mssql_query(): Unable to set query in [script_name] on line 162
PHP Warning: mssql_query(): Unable to set query in [script_name] on
This seems to occur more often if the server is particularly busy, such
that I have tried to carefully time my cronjobs not to overlap at night.
I've never seen a large query fail when I run it directly in SQL Server
Management Studio Express.