Skip to content

enomem error when receiving a large response #48

@konstantino

Description

@konstantino

hi, I was wondering if you had a quick tip on how I could go around such an error, in particular if it would be possible to mediate this via an option.

large in this particular case means a content-length greater than 60742854 [so "Content-Length","60742854"]. I'm using lhttpc in a wrapper which retrieves data from elastic search and in some cases where the amount of data I'm retrieving exceeds this particular threshold I get this exception. Any help will be appreciated. Thanks.

More details on the exception:

{error,
{enomem,
[{lhttpc_client,read_length,4,
[{file,"src/lhttpc_client.erl"},{line,639}]},
{lhttpc_client,handle_response_body,4,
[{file,"src/lhttpc_client.erl"},{line,484}]},
{lhttpc_client,read_response,4,
[{file,"src/lhttpc_client.erl"},{line,446}]},
{lhttpc_client,execute,9,
[{file,"src/lhttpc_client.erl"},{line,169}]},
{lhttpc_client,request,9,
[{file,"src/lhttpc_client.erl"},{line,92}]}]}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions