Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Every so often requests to a Linux server (say, linux.example.org) where the web app (Django) pulls in data from a SQL Server database via FreeTDS will hang.

Requests on other servers pointing to the database still work, as do requests on linux.example.org that use local MySQL databases. Only the server plus FreeTDS appear to be affected.

Restarting httpd makes the database connections work correctly again.

What could cause this problem?

Using: Centos 5.9 freetds 0.91 Apache httpd 2.2.3

/etc/obdc.ini:

[DSN]
Description = SQL Server 2005
Driver      = FreeTDS
;Database   = dbname        
Servername  = SERVERNAME
;TDS_Version    = 8.0

/etc/freetds.conf:

[SERVERNAME]
driver = /usr/lib64/libtdsodbc.so
host = db.example.org
port = 1433
tds version = 8.0
client charset = UTF-8
share|improve this question

1 Answer 1

Are you able to reproduce it programatically? I mean, have a testcase that you can run and get the same behavior to happen. Have you logged the SQL it's trying to run when this happens? Do you see any error message on logs? I'd attach strace to appropriate processes to check what's going on, tcpdump, etc.

share|improve this answer
    
Yeah, can't reproduce. It happens sporadically unfortunately, possibly based on either issues with the database that are resolved by all other servers with a restart of the DB server. I really can't tell. This might just be one of those unsolvable issues; was hoping someone else had run into the identical problem and figured it out. –  Jordan Reiter Nov 15 '13 at 14:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.