How to decrease memory usage while in loop?

Регистрация
16.05.2014
Сообщения
145
Реакции
25
Баллы
18
I have a template that is running in loop, via youtube and facebook.
Memory usage after hour with 1 thread goes to 3gb and is still increasing, clearing cache each time does not work.

Is there any other method to decrease memory usage?
 
  • Спасибо
Реакции: mikakojonkowski
  • Спасибо
Реакции: mikakojonkowski
If you are making loops only because you want to keep cookies then much better way is to save cookies and load cookies in next run...
Reference: http://wiki.zennolab.com/doku.php?id=en:profile

Cheers

I already figured out how to save/ load cookies but that doesnt solve my problem. When i use restart instance - in project maker its working (nothing really happens).
But in zenno poster thread is just closing.

This template is for social exchange network. It is loggin into youtube, facebook, then running loop following/liking facebook/youtube pages.
Everything is working great, just the ram usage is too high.

Can you let me know how to restart instance and keep zennoposter running in just 1 thread?
 
Yes i have some social exchange templates also, and RAM usage is really high, but i see no problems with that because i have configured exactly as i said, just do not make too much loops, and use save and load cookies.
 
  • Спасибо
Реакции: mikakojonkowski
Yes i have some social ederxchange templates also, and RAM usage is really high, but i see no problems with that because i have configured exactly as i said, just do not make too much loops, and use save and load cookies.

So where do you use restart instance? Beacuse when instance is restarted thread is closing. I dont understand on what logic basis this should work.
 
When one module is over then restart instance, and go to next module. With module i mean Twitter Followers example.
But as i said Use less loops in your template and add more executions, this will solve all your problems...
 
  • Спасибо
Реакции: mikakojonkowski
When one module is over then restart instance, and go to next module. With module i mean Twitter Followers example.
But as i said Use less loops in your template and add more executions, this will solve all your problems...

I am facing the exact problem of crazy memory usage.
May I ask what does "executions" mean here?
 
If you are making loops only because you want to keep cookies then much better way is to save cookies and load cookies in next run...
Reference: http://wiki.zennolab.com/doku.php?id=en:profile

Cheers

I think the execution above referes to the execution in the ZP panel. Then comes another question:

If I have 20 threads, each thread runs under a different a username. How to use "save cookies and load cookies" for each username?

I thought profile is a global set of data that applies to all threads? It there a way to have multiple profiles, each profile linked to each thread to avoid using loop?

Thanks.
 
Profiles are not global.
You can create 1 profile for each account and load it when you need it.
 
When a project finishes, will it automatically free up the memory for the instance?

If not, I am thinking about adding reset instance at the end of every projects to free up memory.
Do you think this is necessary? Will it actually reduce memory usage?

Thanks.
 
Full memory cleaning is perfomed on instance restart, not after project is finished.
 
So if I restart an instance, the program will still stay logged in into the account and no cookies will be lost? It wiill just clean up memory?
 
That mean we have to put Restart instance action at the end of each project, whatever if there is no loops at all ?

That's what I am doing after testing many projects: reset at every finish. I am seeing a significant improvement in memory usage, especially for multi-threaded ones.
(but ZP seems to crash more often now.)
 
That mean we have to put Restart instance action at the end of each project, whatever if there is no loops at all ?
You can but you dont need to in most cases. I'm talking about memory leaking, not about memory that is used for operations with project.
Second one is cleaned once instance comes to end.

So if I restart an instance, the program will still stay logged in into the account and no cookies will be lost? It wiill just clean up memory?

Yep

(but ZP seems to crash more often now.)

Keep an eye on freee system resources. Maybe there's not enought of any of them.
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)