rabbitmq / rabbitmq-objc-client

RabbitMQ client for Objective-C and Swift
https://rabbitmq.com
Other
241 stars 85 forks source link

Write operation timed out error - Large sized files (like images) are not sent #104

Closed yilmazgamze closed 7 years ago

yilmazgamze commented 7 years ago

If a file has about 750-800 kb size (or larger) I get an error as:

Received connection: disconnectedWithError: Error Domain=GCDAsyncSocketErrorDomain Code=5 "Write operation timed out" UserInfo={NSLocalizedDescription=Write operation timed out}

All other sending operations works as they should do. This occurs in photo or video sending type operations. By the way, i tried using GCD or NSOperation considering possibility of local problems. Nothing works.

michaelklishin commented 7 years ago

Please post questions to rabbitmq-users or Stack Overflow. RabbitMQ uses GitHub issues for specific actionable items engineers can work on, not questions. Thank you.

yilmazgamze commented 7 years ago

This is not an ordinary question. I've already asked it in other platforms. However, Andrew Bruce suggested me to file an issue here because of it's seeming as a bug. Thank you!

michaelklishin commented 7 years ago

@gamzeylmz is there a code snippet that reproduces this problem on localhost?

SimonErm commented 5 years ago

This is caused by https://github.com/rabbitmq/rabbitmq-objc-client/blob/9541386d802a3fbb95b7a646637c92a62613de94/RMQClient/RMQTCPSocketTransport.m#L143. I think this timeout should be configurable and i would like to do a PR.

michaelklishin commented 5 years ago

@SimonErm good catch. The default probably can be 15 or 30 seconds but yes, it should be configurable. Go ahead and submit a PR.

michaelklishin commented 5 years ago

Filed #150 with more details and the findings by @SimonErm 👏.

michaelklishin commented 5 years ago

Addressed in https://github.com/rabbitmq/rabbitmq-objc-client/commit/2cba1bd8e786fd799aa49bb246b8eac467eb1409.