18F / culper

Culper is the foundation for eApp, a part of the National Background Investigation System (NBIS), supporting the SF-86, SF-85, and SF-85P. This is its source code and developer documentation. For background information and a demo video see https://github.com/18F/culper/wiki
Other
27 stars 22 forks source link

Receiving intermittent "Failed to retrieve form saved data" console error #952

Closed hursey013 closed 5 years ago

hursey013 commented 5 years ago

What did you do?

Using app pre-loaded with test 5's test data, when computer is under heavy load (Google Video or other high CPU background processes), after logging in, the "We are loading your data" screen hangs.

What did you expect to see?

App to load successfully under any load.

What did you see instead?

App hangs on loading screen with Failed to retrieve form saved data console error.

ryanhofdotgov commented 5 years ago

This may an issue that other teams at NBIS have seen off-and-on.

ryanhofdotgov commented 5 years ago

Tip from the other NBIS team: What we noticed in the JavaScript code is that the AJAX requests are configured to have a 10s timeout limit. Removing that limit resolved the issue we saw. Seems like it was copied from the example code of the axios library that was used: https://github.com/18F/e-QIP-prototype/blob/develop/src/services/api.js#L42

christopherhuii commented 5 years ago

Is this a fetching/AJAX thing or a React/Redux thing?

If you look at the console after logging in, there are over 200 actions getting logged, which might be hogging up a lot of memory causing it to hang.

hursey013 commented 5 years ago

@christopherhuii the redux logging only happens in the dev environment, but it does definitely seem to slow things down. Would increasing the timeout be a sufficient remedy for now?

ryanhofdotgov commented 5 years ago

I should add, the timeout limit change has already been made in the fork by the other NBIS team. This was one of the 2 or 3 small changes they've made to the frontend code.