[Samba] Samba Timeout Issue

Kaj Mikkelsen kmi at vitesse.com
Tue Jul 29 12:11:14 GMT 2003

Samba version: 2.2.8a
Linux flavour: RedHat 7.2
Kernel version 2.4.20
Samba server running on same host as the disk server
Client version: Windows 2000 w. SP3

Problem Summary
Windows clients disconnect SMB TCP connection when slow response from heavily loaded server.
This causes applications to terminate with an error, or worse: hang.

Problem Details
Observations on client
A test application on the client opens a file in write through mode (Win32:FILE_FLAG_WRITE_THROUGH) and writes a timestamp to this file every 10 seconds.
After some time, the file access fails (typically with the error ERROR_NETNAME_DELETED).

Observation on network (using Ethereal)
At 14:07:53 a successful write is performed. This is correctly acked by the 
samba server both on TCP and samba level. 
The ack occurs immediately. 

At 14:08:03 (10 secs later) next write is requested by client. 
This samba request is ack'ed immediately on TCP level (by server), but no 
samba acknowledge is received. 

At 14:08:41 Client sends an SMB Echo Request to the server (probably 
because it is getting impatient for the SMB Ack). This SMB Echo gets ack'ed on TCP 
level, but no SMB response is received. 

At 14:09:14 Client disconnects the connection to the server (probably 
because it timed out waiting for the SMB Ack). The TCP FIN is correctly acked 
(on TCP level) by the server. 
The TCP connection is now only open in the direction from the server to the 
client (has not been disconnected in that direction yet). 

At 14:09:27 the server sends 
1) an SMB ack for the write request, which occurred at 14:08:03. 
2) an SMB Echo Response (for the SMB Echo Request at 14:08:41). 

At 14:09:27 client acks on TCP level. 
At 14:09:27 the server disconnects the TCP connection (in the remaining 
direction from the server to the client). 

Between above mentioned events there is no other communication between 
client and the server.

The trace of the communication between the server and the client is attached (ascii format).

Observation on server
Concurrently with the problem occuring at the client the disk server is responding very slowly (up to 80-90 secs). This response time can also be observed from an application running on the server itself. So the slow response time seems to stem from the disk server (rather than the samba server).
The heavily loaded disk server, forces the samba daemon into Device Wait mode.

a) Is it a known SMB limitation that SMB does not support occasionally slow disk servers?
b) Does anyone know a way of configuring the timeout value for the client?
c) If the SMB protocol allows it, maybe the problem could be relieved by having the SMB server respond to the SMB Echo Request while waiting for response from the disk server. Any comments to this?


More information about the samba mailing list