Openrefine: incompatible with http2

Created on 8 Nov 2018  路  3Comments  路  Source: OpenRefine/OpenRefine

Describe the bug
If you put a reverse proxy in front of open refine, a reverse that speak http2 with the outsite word, openrefile will run very slow for every set of GET requests, and sometimes you will get 503 errors.
If i disable http2, to return to http1.1, the problem disappear.

To Reproduce
Steps to reproduce the behavior:

  1. install a reverse proxy like nginx, with a configuration like:
    `
    server {
    listen *:443 ssl http2;
    server_name openrefine.locale.lan;
    ssl_certificate      /etc/nginx/conf.d/my.cer;
    ssl_certificate_key  /etc/nginx/conf.d/my.key;

    location / {
            proxy_pass         http://127.0.0.1:3333/;
    }

}
`
please note that nginx speaks http2 with the outsite word (browser), but http1.1 with the backend openrefine server (on http://127.0.0.1:3333/).

  1. open a browser to https://localhost
  2. in the first page you will get some "waiting..", the whole page will be loaded with a delay of ~30-50s.
    If you open a Developer Tools, you will se that some files are not loaded immediatly but only after a delay of ~30-50s. Take a look at the attached file.

Current Results
Even the first page is delayed of ~30-50s, sometimes you will get 503 errors.

Expected behavior
Normal loading time of max 3s for the first page.

Workaround

  1. On Firefox go to about:config, and set to false "network.http.spdy.enabled.http2"
  2. On nginx or the reverse proxy, disable the http2, by changing the configuration to:
    `
    server {
    listen *:443 ssl;
    server_name openrefine.locale.lan;
    ssl_certificate      /etc/nginx/conf.d/my.cer;
    ssl_certificate_key  /etc/nginx/conf.d/my.key;

    location / {
            proxy_pass         http://127.0.0.1:3333/;
    }

}
`
(i've removed the http2).
With these two workaround, openrefine is fast as normal.

Screenshots
openrefine-broken-ok

Desktop (please complete the following information):

  • OS: Windows 7 or Windows 10, but not limited to
  • Browser Version: Firefox 63.0.1 (64-bit), Chrome 70.0.3538.77

OpenRefine (please complete the following information):

  • Version OpenRefine 3.0
  • Java Version: 8u181 (i'm using the docker image openjdk:8-jdk-slim-stretch)
enhancement

Most helpful comment

Thanks for the report! I think this should be solved by migrating to a modern web framework.

All 3 comments

Thanks for the report! I think this should be solved by migrating to a modern web framework.

Disable of http2 from Ngix make sense since http2 only works better/faster when the application use the SSL/TLS:
https://www.nginx.com/blog/7-tips-for-faster-http2-performance/

Also I think there will be some http1.1/http2 conversion occurs which also take time.

In 4.x I have upgraded Butterfly to use Jetty 9 which supports HTTP 2, I am not sure if this will automatically solve this though.

Was this page helpful?
0 / 5 - 0 ratings