Remove old code to exit after 10000 requests as the memory limit code
should do a better job of controlling things.
This commit is contained in:
parent
85b3f7ffbc
commit
72b05157ae
2 changed files with 0 additions and 21 deletions
|
@ -7,9 +7,6 @@ class ApiController < ApplicationController
|
|||
# Help methods for checking boundary sanity and area size
|
||||
include MapBoundary
|
||||
|
||||
#COUNT is the number of map requests to allow before exiting and starting a new process
|
||||
@@count = COUNT
|
||||
|
||||
# The maximum area you're allowed to request, in square degrees
|
||||
MAX_REQUEST_AREA = APP_CONFIG['max_request_area']
|
||||
|
||||
|
@ -73,13 +70,6 @@ class ApiController < ApplicationController
|
|||
trkseg << point.to_xml_node()
|
||||
end
|
||||
|
||||
#exit when we have too many requests
|
||||
if @@count > MAX_COUNT
|
||||
render :text => doc.to_s, :content_type => "text/xml"
|
||||
@@count = COUNT
|
||||
exit!
|
||||
end
|
||||
|
||||
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
|
||||
|
||||
render :text => doc.to_s, :content_type => "text/xml"
|
||||
|
@ -206,13 +196,6 @@ class ApiController < ApplicationController
|
|||
response.headers["Content-Disposition"] = "attachment; filename=\"map.osm\""
|
||||
|
||||
render :text => doc.to_s, :content_type => "text/xml"
|
||||
|
||||
#exit when we have too many requests
|
||||
if @@count > MAX_COUNT
|
||||
@@count = COUNT
|
||||
|
||||
exit!
|
||||
end
|
||||
end
|
||||
|
||||
# Get a list of the tiles that have changed within a specified time
|
||||
|
|
|
@ -2,7 +2,3 @@
|
|||
if Process.const_defined?(:RLIMIT_AS)
|
||||
Process.setrlimit Process::RLIMIT_AS, 1024*1024*1024, Process::RLIM_INFINITY
|
||||
end
|
||||
|
||||
# Force a restart after every 10000 requests
|
||||
COUNT = 0
|
||||
MAX_COUNT = 10000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue