auth_token middleware fails for concurrent requests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Fix Released
|
High
|
Unassigned |
Bug Description
We were trying to run some performance tests on [melange](https:/
```log
2011-08-10 14:36:56 DEBUG [eventlet.
File "/home/
'Content-
IndexError: list index out of range
```
The log just gives an indication that heders_set array is empty. Digging deep in to the error we found that this was due to the auth_token middleware.
This happens because *start_response* callback is stored as a instance level attribute in auth_token and being used in serveral private methods. When concurrent request are made, same instance of start_response callback is being reused across the multiple request.
The issue can be fixed by passing start_response as arguments to these private_methods such as _forward_request etc.
The same applies to request *env* and *proxy_headers* variables, which are being used as instance attributes should be passed as method arguments.
If you need any help in reproducing issue, please let me know. I have pasted the command that was used for benchmarking.
```
autobench --single_host --host1=
```
Response:
```
Connection rate: 0.9 conn/s (1080.7 ms/conn, <=100 concurrent connections)
.
.
Reply status: 1xx=0 2xx=1 3xx=0 4xx=0 5xx=99
```
Iam working on this issue.