Hello sir, it looks like your codes aren't optimized enough to use less memory, It is also possible that there is a bug that keeps creating processes thus consuming all memory. I will help you to fix either of the problem and get your codes to work efficiently. I will also elaborate my solution so that you can understand clearly the problem