Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Termux suddenly closed when more cpu or memory used #1789

Closed
sobaee opened this issue Oct 10, 2020 · 4 comments
Closed

Termux suddenly closed when more cpu or memory used #1789

sobaee opened this issue Oct 10, 2020 · 4 comments
Labels

Comments

@sobaee
Copy link

sobaee commented Oct 10, 2020

Hello dear developers

I use Termux for glossary converting tool "pyglossary", when I try to convert a big glossary Termux closed suddenly when the process reach to 99.9%,
N.B: I did everything to prevent closing (kept termux notification and locked it in recent apps, added exeption for Termux in battery optimization, make not to be checked by "Device care app of samsung", closed every app other than Termux, run it as forground with light on and I kept cooling my phone with fun.

N.B: converting smaller glossaries of the same type done smoothly "so, it is not pyglossary issue"
N.B: During the process, cpu usage reach to 100% many times and sometimes android tells me that python use more cpu and I close this message. But no storage space problem.

I hope you suggest or make any solution.
Thanks a lot 🙏

@ghost
Copy link

ghost commented Oct 10, 2020

Nothing can prevent Termux from being closed once certain memory usage threshold is reached. Safe memory usage by any application on Android is no more than 50%. Beyond that, probabilities of triggering OOM killer drastically increase.

Android devices are focusing on system stability and multitasking, they are not designed for processing large amounts of data.

added exeption for Termux in battery and memory optimization

Android does not have such thing as "exceptions for memory optimization".

But no memory or storage space problems.

Really? Then how Termux reached out-of-memory condition (crash)?

@ghost ghost closed this as completed Oct 10, 2020
@ghost ghost added the invalid label Oct 10, 2020
@sobaee
Copy link
Author

sobaee commented Oct 10, 2020

Sorry, my mistake
I edited the comment to be slightly perfect as you may like to see.

About apps that aren't checked by Device care, this picture may help to show what I main:
Screenshot_20201010212256

Thanks for your quick response, and understanding.

One more thing,
Cpu overusing has no thing to do with this crash?

Iam a beginner, If this question may irritate you again, just ignore it 😊

@ghost
Copy link

ghost commented Oct 10, 2020

About apps that aren't checked by Device care, this picture may help to show what I main:

Device Care has nothing to do with lowmemorykiller (kernel driver) or lmkd (userspace) and can't configure them.

Cpu overusing has no thing to do with this crash?

CPU overusing causes device heating and quickly drains battery charge, nothing more.


Suggesting to try

ulimit -m $((256 * 1024))
ulimit -v $((256 * 1024))

to limit memory allocations to 256MiB max. You may change "256" to some other value, e.g. 512.

@sobaee
Copy link
Author

sobaee commented Oct 10, 2020

Many thanks
I appreciate that 🙏

@ghost ghost locked and limited conversation to collaborators Oct 17, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant