SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Prevent IncompleteMessage Errors on Segment Batch API

Question

Why am I seeing IncompleteMessage errors and connection drops when using the Segment /v1/batch endpoint, especially with Rust reqwest and hyper clients in Windows environments?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

IncompleteMessage errors and connection drops can happen when the client’s HTTP connection pool idle timeout is longer than Segment’s Application Load Balancer (ALB) idle timeout of 60 seconds. If the ALB closes an idle connection while your client tries to reuse it, the response may be incomplete. This is more common in Windows desktop environments and with Rust reqwest/hyper clients.

To reduce these errors:

  • Set your HTTP client’s pool idle timeout to less than 55 seconds (for example, 50 seconds).
  • Enable automatic retry for connection errors.
  • Check if local proxies or firewalls have shorter idle timeouts and adjust your client settings accordingly.
  • For Rust reqwest/hyper clients, explicitly configure idle timeout and retry logic.

 

Additional Information 

 

Have more questions? Submit a request
Powered by Zendesk