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

respond with 404/500 if map.load() fails #3

Closed
springmeyer opened this issue Sep 2, 2011 · 3 comments
Closed

respond with 404/500 if map.load() fails #3

springmeyer opened this issue Sep 2, 2011 · 3 comments

Comments

@springmeyer
Copy link
Owner

otherwise failures will look like really fast tile reponses when testing. This is imperitive because we're now seeing layer constructors throw when max_size is reached in the postgres pool

@kkaefer
Copy link
Contributor

kkaefer commented Sep 2, 2011

We should already be returning 500 when we encounter an error. When map.load() fails, that map object won't be put into the pool. Only the call to maps.release(map); actually puts it into the pool.

@springmeyer
Copy link
Owner Author

try running >= http://trac.mapnik.org/changeset/3258, setting max_size slightly smaller than your libeio threads and then loading the server. Some responses will the plain text errors, which I guessed were not 404's because ab did not report errors (before ab was in "error"?)

@ghost ghost assigned kkaefer Sep 2, 2011
@springmeyer
Copy link
Owner Author

wow - looks like ab does not treat 500's as errors in its report I'm just reading things wrong. anyway, this is working just fine sorry for the false alarm, closing:


d:~ dane$ curl -I http://localhost:8000/?bbox=foo
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Connection: keep-alive

d:~ dane$ ab -n 1 "http://localhost:8000/?bbox=foo"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done


Server Software:        
Server Hostname:        localhost
Server Port:            8000

Document Path:          /?bbox=foo
Document Length:        464 bytes

Concurrency Level:      1
Time taken for tests:   0.002 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Non-2xx responses:      1
Total transferred:      562 bytes
HTML transferred:       464 bytes
Requests per second:    450.65 [#/sec] (mean)
Time per request:       2.219 [ms] (mean)
Time per request:       2.219 [ms] (mean, across all concurrent requests)
Transfer rate:          247.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     2    2   0.0      2       2
Waiting:        2    2   0.0      2       2
Total:          2    2   0.0      2       2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants