Depending on network setup (local stateful filtering, NAT), the network connection from winbind to the domain controller may often be closed unexpectedly. Apparently winbind tries to mitigate by doing a domains refresh every 5 minutes. Unfortunately the typical timeout on stateful filters is 3 minutes. Anyway this is not really the right approach.
The attached patch fixes this problem by interpreting the error the code gets when the connection was unexpectedly closed as a transient error and retrying instead of returning the error.
The patch is against the Ubuntu 3.0.22-1ubuntu3.3 packages, the code has changed since, but porting to the recent version shouldn't be hard.
Created attachment 2939 [details]
patch to reconnect on receiving connection closed
Volker, Günther: can you have a look at this?