Scrapling memory usage #112
Answered
by
D4Vinci
ArmandoSchiano
asked this question in
Q&A
|
Hello, I have created some endpoints that call Scrapling classes. However it seems the memory usage is very high (lots of processes spawning and high RAM usage). I would like to know what's wrong with my configuration: Is there a way to close browser and context after every call? I am using a systemd ubuntu service running simple_http_server. Below are the systemd stats 8 minutes after restart and a few calls: Below is the code: |
Answered by
D4Vinci
Nov 22, 2025
Replies: 1 comment
|
Hi there, The Here are some things you can try:
Let me know how these options work with you. |
0 replies
Answer selected by
ArmandoSchiano
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
The
StealthyFetcherclass uses more resources thanDynamicFetcherby default because it uses thecamoufoxbrowser, which causes this.Here are some things you can try:
DynamicFetcheris sufficient for your case or not. If it is, use it, as it uses much less resources.StealthySessioninstead to keep the browser open, instead of opening a new browser with every request.DynamicSessionfor the other way around.Let me know how these options work with you.