How are you making your data connection? Web Service? Direct Database connection?
Are you expecting a large amount of data? Did you check to see if there was any performance issues with the actual query that is being exected?
You can increase the timeout for a data connection through code. You can increase the connection time out by using the Timeout property. Check it out in InfoPath help.
Jason
http://www.k2distillery.com/