-
Notifications
You must be signed in to change notification settings - Fork 670
Description
Hello 😊
Description
I am experiencing a persistent connection error when trying to remove users from a CustomAudience using the remove_users method.
The error message is: 'Connection aborted.', RemoteDisconnected('Remote end closed connection without response')
This error consistently occurs when the batch size (the number of users in the users list) is 300 or more. When I use an identical call with a batch size of 250, the operation succeeds every time.
Impact
This limitation is a significant bottleneck for our use case. We need to remove large volumes of users from audiences (up to 4 million users at a time). With a maximum successful batch size of 250, an operation of this scale takes well over 24 hours to complete, which is not feasible for our daily data pipelines. We need to be able to send larger, more efficient batches (ideally 5,000-10,000 as documented for add_users) to complete the operation in a reasonable timeframe.
I would be happy to hear any suggestions on how we might increase the batch size without running into this connection issue, or if there is any other method you recommend to help us speed up the removal of a large number of users. Simply increasing parallelism with the small 250-user batch size is not our ideal goal, especially since we are restricted in the number of parallel tasks we can run in our environment.
Versions
- SDK Version:
facebook-business==24.0.0 - API Version:
v24.0
Thank you very much for looking into this! 🙂