@andreiem I added a random sleep time before all the procedures started. The 1st thread starts. and then 2nd thread .. 3 and 4 5 ... Since they do not do the same operations at the same time, they do not consume much processor.
Yes, i also faced this problem, what i did was if file size was > 100kb then i delete cookies and bot will check if cookies are not present then it will call login function and new cookies file will be saved which will be less than 100 kb.