这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@abruyat
Copy link

@abruyat abruyat commented Jul 19, 2017

Hi guys!
I've try to use grequests but the sessions wasn't close so my HA proxy was laggy...
I've solved the problem by closing the session in a finally. The tests pass in my env.
Maybe there is other solutions to this problem.

Regards,

Adrien

@Oxicode
Copy link

Oxicode commented Feb 6, 2019

+1

1 similar comment
@dopch
Copy link

dopch commented Jan 12, 2020

+1

@spyoungtech
Copy link
Owner

spyoungtech commented Apr 2, 2020

Makes sense to me, but it may not be desirable to close the session, for example, if a session object was provided when creating the AsyncRequest object.

As a possible solution to your problem, you could create a session object and pass that same session object in for all your requests. That way, you should take advantage of the connection pooling of the one session, rather than opening a new connection for each request.

Unless I'm missing something here, but I'm going to close for now, since this has been open for a while without activity. Feel free to reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants