-
Notifications
You must be signed in to change notification settings - Fork 1
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
Failure on Certain Inputs #46
Comments
The NginX reverse proxy sometimes increases the request block sizes to more than the default maximum for this server. This addresses issue nlpsandbox/phi-deidentifier-app#46.
This is a very counter-intuitive bug. An interesting example is that inputting the contents of I also noticed that the container that was giving the error was not the
underneath the
to the
notice that although the only difference between the two deidentify requests we made was that the failing one is going through the NginX proxy on its way to the backend. Also notice that the The proxy seems to be changing the size of the request blocks in some way that I don't totally understand and unfortunately can't predict. I looked at the NginX documentation for some setting that would allow me to fix this; specifically, I wanted to find some way to restrict the proxy from passing on request blocks to the Therefore I fixed this problem by changing the buffer size of the WSGI server on the backend server. This is not a very satisfying fix, since I still don't understand why the proxy is outputting larger block sizes than the client is sending to it. I can't even guarantee that it won't send a request block that is even bigger than whatever we set the WSGI server's |
I agree, it's very confusing that inputing each note individually lead to an error (what are the specific error?) but then you observe no error when combining the two notes together (what did you the idea of doing that? If you were testing the length, you could just have duplicated one note). Did you try to reduce the content to try to narrow the issue? Other information that could be useful is to find the block size of each request (2 individual and the 1 combined). If the logs don't show that by default, you could configure
What is the current buffer size (is it 4096 as shown in the logs)? What is the new value that you recommend using? Why? |
The NginX reverse proxy sometimes increases the request block sizes to more than the default maximum for this server. This addresses issue nlpsandbox/phi-deidentifier-app#46.
* Increase Buffer Size The NginX reverse proxy sometimes increases the request block sizes to more than the default maximum for this server. This addresses issue nlpsandbox/phi-deidentifier-app#46. * Add Flask Testing * Update to Schema 1.1.1 * Update nlpsandboxclient & Annotator Versions * Switch Unit Tests to Using Properly-formatted dicts * Update Listed API Version to 1.1.1 * Fix Flake8 Issues * Fix Flake8 Issues * Update nlpsandbox-client version in test-requirements.txt Co-authored-by: Thomas Schaffter <thomas.schaffter@gmail.com>
* Increase Buffer Size The NginX reverse proxy sometimes increases the request block sizes to more than the default maximum for this server. This addresses issue nlpsandbox/phi-deidentifier-app#46. * Add Flask Testing * Update to Schema 1.1.1 * Update nlpsandboxclient & Annotator Versions * Switch Unit Tests to Using Properly-formatted dicts * Update Listed API Version to 1.1.1 * Fix Flake8 Issues * Fix Flake8 Issues * Add Contact and ID to config.py * Add ID & Contact Annotators to docker-compose.yml Stack * Add ID & Contact to deidentified_notes Controller Code * Fix Annotator Versions in docker-compose.yml * Add ID & Contact Annotator Tool Dependencies * Fix ID & Contact annotation keys in De-ID Controller * Update Unit Tests to Include ID & Contact * Fix Formatting for Flake8
Problem description
I am running the client stack with
docker-compose up --build
. When I input a certain large/long note (e.g.119-01.txt
,117-01.txt
from the I2B2 dataset), it results inAPI Error!
as the output. I checked thestdout
of the docker-compose stack, and it said the following:Weirdly, though, when I run the
phi-deidentifier
stack, and input this note through the UI at/api/v1/ui
, it seems to run perfectly fine.Steps to reproduce the issue
phi-deidentifier-app
stack119-01.txt
,117-01.txt
,116-01.txt
,116-02.txt
,116-03.txt
from the I2B2 dataset)Expected behavior
The text was updated successfully, but these errors were encountered: