menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

gatsby-drupal-wg

Gatsby Working Group: Drupal - Drupal module: https://www.drupal.org/project/gatsby - Gatsby source plugin: https://www.gatsbyjs.org/packages/gatsby-source-drupal/

Channels
Team

Drupal GraphQL module with frequent ECONNRESET errors

April 30, 2019 at 2:19pm

Drupal GraphQL module with frequent ECONNRESET errors

April 30, 2019 at 2:19pm (Edited 3 years ago)
Sharing a fix in case anyone runs into this same issue.
I was getting frequent errors when my graphql queries were running, such as the following:
Errors:
request to http://localhost:8083/graphql failed, reason: read ECONNRESET
My setup was on windows using Acquia DevDesktop which runs Apache httpd. The fix was relatively simple, increasing the default ThreadStackSize in my httpd-mpm.conf file which is usually located here: C:\Program Files (x86)\DevDesktop\apache\conf\extra\httpd-mpm.conf. Here is an example of what I am using that works for me:
<IfModule mpm_winnt_module>
ThreadStackSize 8388608
ThreadsPerChild 256
MaxConnectionsPerChild 1000
</IfModule>
Basically what was happening was that as gatsby booted up and ran all of the graphql queries for the site, it was pulling alot of data and crashing httpd with a faulting module ntdll.dll. Increasing the default ThreadStackSize fixed the issue.
The ThreadStackSize directive sets the size of the stack (for autodata) of threads which handle client connections and call modules to help process those connections. In most cases the operating system default for stack size is reasonable, but there are some conditions where it may need to be adjusted:
On platforms with a relatively small default thread stack size (e.g., HP-UX), Apache httpd may crash when using some third-party modules which use a relatively large amount of autodata storage. Those same modules may have worked fine on other platforms where the default thread stack size is larger. This type of crash is resolved by setting ThreadStackSize to a value higher than the operating system default. This type of adjustment is necessary only if the provider of the third-party module specifies that it is required, or if diagnosis of an Apache httpd crash indicates that the thread stack size was too small.

June 6, 2019 at 2:53pm
for anyone affected by this on Acquia DevDesktop, switch to using fastcgi instead of apache module under Config tab of settings dialog.