Hey, sorry for the rather quick topic; will Glitch kill any project that happens to send a HTTP request to a miner?
If not: what would kill a project had the project sent a HTTP request to a site? I just want to know what’s allowed on Glitch and what’s not. I specifically asked for a miner (ex. server.duinocoin.com) because I know Replit tends to kill projects which do that, but that’s just an example.
there’s no public info on the details of the mining detection. but here’s what I think.
due to limitations in the mining detection, it may classify some non-mining references to mining terms as mining. if your project includes URLs that contain these mining terms, it might detect that as mining. if you say “oh I’ll remove those. let me just find out where they are” and run a search for a mining term, it’ll run a grep -r with the term you typed as part of the command long, that grep will use a lot of CPU, and it’ll very definitely detect that as mining.
addendum: and I think there’s a philosophical separation between “mining detector suspended my protect” and “I broke the rules on Glitch.” but in practice, it seems not worth much. I don’t know if Glitch writes their own mining detection heuristics, so there may be some reluctance to adjust things if you have a non-mining project the gets suspended. the response would probably be “we see how a non-mining project as you describe would be detected as mining. we make no claim as to whether your project was really mining or not, not please do not run it on Glitch.”
It seems like building cpulimit from source on a Glitch container takes under 3 seconds, so it wouldn’t even need to use a precompiled binary:
app@2ed833416fb1:/tmp$ time sh -c 'git clone https://github.com/opsengine/cpulimit;cd cpulimit;make'
Cloning into 'cpulimit'...
remote: Enumerating objects: 536, done.
remote: Counting objects: 100% (55/55), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 536 (delta 45), reused 39 (delta 39), pack-reused 481
Receiving objects: 100% (536/536), 160.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (318/318), done.
Checking connectivity... done.
cd src && make all
make[1]: Entering directory '/tmp/cpulimit/src'
cc -c list.c -Wall -g -D_GNU_SOURCE
cc -c process_iterator.c -Wall -g -D_GNU_SOURCE
cc -c process_group.c -Wall -g -D_GNU_SOURCE
cc -o cpulimit cpulimit.c list.o process_iterator.o process_group.o -Wall -g -D_GNU_SOURCE
cpulimit.c:46:18: warning: extra tokens at end of #ifdef directive
#ifdef __APPLE__ || __FREEBSD__
^
make[1]: Leaving directory '/tmp/cpulimit/src'
cd tests && make all
make[1]: Entering directory '/tmp/cpulimit/tests'
cc -o busy busy.c -lpthread -Wall -g
cc -I../src -o process_iterator_test process_iterator_test.c ../src/list.o ../src/process_iterator.o ../src/process_group.o -lpthread -Wall -g
process_iterator_test.c:31:18: warning: extra tokens at end of #ifdef directive
#ifdef __APPLE__ || __FREEBSD__
^
make[1]: Leaving directory '/tmp/cpulimit/tests'
real 0m2.517s
user 0m0.380s
sys 0m0.108s
app@2ed833416fb1:/tmp$ cpulimit/src/cpulimit --help
Usage: cpulimit [OPTIONS...] TARGET
OPTIONS
-l, --limit=N percentage of cpu allowed from 0 to 400 (required)
-v, --verbose show control statistics
-z, --lazy exit if there is no target process, or if it dies
-i, --include-children limit also the children processes
-h, --help display this help and exit
TARGET must be exactly one of these:
-p, --pid=N pid of the process (implies -z)
-e, --exe=FILE name of the executable program file or path name
COMMAND [ARGS] run this command and limit it (implies -z)
Report bugs to <marlonx80@hotmail.com>.
app@2ed833416fb1:/tmp$
What is it that you want Glitch to just yk do - have cpulimit set up already on containers? I can add that to our community feedback requests to share with the team, just want to make sure I’m making the right ask here.