How to decrease memory usage while in loop?

Регистрация
16.05.2014
Сообщения
141
Благодарностей
22
Баллы
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?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
  • Спасибо
Реакции: mikakojonkowski
Регистрация
16.05.2014
Сообщения
141
Благодарностей
22
Баллы
18

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
  • Спасибо
Реакции: mikakojonkowski
Регистрация
16.05.2014
Сообщения
141
Благодарностей
22
Баллы
18
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?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
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
Регистрация
16.05.2014
Сообщения
141
Благодарностей
22
Баллы
18
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.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
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...
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
  • Спасибо
Реакции: mikakojonkowski

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
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?
 

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
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.
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Profiles are not global.
You can create 1 profile for each account and load it when you need it.
 

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
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.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
Full memory cleaning is perfomed on instance restart, not after project is finished.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

Energizer

Client
Регистрация
19.06.2013
Сообщения
36
Благодарностей
4
Баллы
8
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?
 

Cyrix

Client
Регистрация
16.12.2011
Сообщения
390
Благодарностей
11
Баллы
18
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.)
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
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.
 

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