Skip to content

Commit ebb3071

Browse files
committed
more tuning
1 parent ec9cd33 commit ebb3071

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎v3/web_exec.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
import sys
1919

2020

21-
# set ~300MB limit on virtual memory AND a 10-second CPU time limit
22-
# to protect against memory bombs such as:
21+
# set ~200MB virtual memory limit AND a 5-second CPU time limit
22+
# (tuned for Webfaction shared hosting) to protect against memory bombs such as:
2323
#
2424
# x = 2
2525
# while True: x = x*x
2626
import resource
27-
resource.setrlimit(resource.RLIMIT_AS, (300000000, 300000000))
28-
resource.setrlimit(resource.RLIMIT_CPU, (10, 10))
27+
resource.setrlimit(resource.RLIMIT_AS, (200000000, 200000000))
28+
resource.setrlimit(resource.RLIMIT_CPU, (5, 5))
2929

3030

3131
# set to true if you want to log queries in DB_FILE

0 commit comments

Comments
 (0)