Comments (2)
Fixed by restarting the server only when it's fully ready
from graphql-framework-experiment.
Issue breakdown
After investigating, it looks like the issue comes from the SIGTERM signal sent to the child being ignored.
1 ℹ Restarting... schema/Blog.ts
2 graphql-santa:cli:dev:compiler compile start schema/Blog.ts +93ms
3 graphql-santa:watcher runner is still executing, will restart upon its exit +0ms
4 graphql-santa:watcher Disconnecting from child. willTerminate === false so sending sigterm to force runner end +1ms
5 graphql-santa:watcher sending SIGTERM to child 18074 and any of its descendent processes +94ms
6 graphql-santa:watcher sigterm to runner process tree completed +22ms <==== **processes killed**
7 graphql-santa:watcher runner exiting +3ms <= **runner catching that and exiting**
8 graphql-santa:watcher runner did not exit on its own accord +0ms
9 graphql-santa:watcher runner received signal "SIGTERM" which caused this exit +0ms
10 graphql-santa:watcher will spawn runner +0ms
11 graphql-santa:watcher using runner module at /Users/flavian/projects/prisma/graphql-santa-examples/blog/node_modules/graphql-santa/dist/watcher/runner.js +0ms
12 graphql-santa:watcher using child-hook-path module at /var/folders/wt/rlkwn4mn2872qwqjyykz191m0000gn/T/ts-node-dev-hook-13205991653397264.js +0ms
13 graphql-santa:cli:dev:runner starting context type extraction +0ms
14 graphql-santa:compiler finished compiler extension processing with results { contextTypeContributions: [] } +0ms
15 graphql-santa:cli:dev:runner finished context type extraction +960ms
16 graphql-santa:file-watcher file watcher event "change" originating from file/dir schema/Blog.ts +1s
17 graphql-santa:watcher restarting runner because runnerRestarting = false +1s
18 ℹ Restarting... schema/Blog.ts
19 graphql-santa:cli:dev:compiler compile start schema/Blog.ts +1s
20 graphql-santa:watcher runner is still executing, will restart upon its exit +0ms
21 graphql-santa:watcher Disconnecting from child. willTerminate === false so sending sigterm to force runner end +0ms
22 graphql-santa:watcher sending SIGTERM to child 18076 and any of its descendent processes +1s
23 graphql-santa:watcher sigterm to runner process tree completed +21ms <==== **processes killed**
24 graphql-santa:plugin-manager loading runtime of plugin prisma +0ms <==== **runner continues to run ....**
25 graphql-santa:plugin:prisma Running runtime... +0ms
26 graphql-santa:schema finding modules... +0ms
We can compare a successful run on line 6 and 7
6 graphql-santa:watcher sigterm to runner process tree completed +22ms <==== **processes killed**
7 graphql-santa:watcher runner exiting +3ms <= **runner catching that and exiting**
with a run that eventually ends up with an EPIPE error on line 23 and 24.
23 graphql-santa:watcher sigterm to runner process tree completed +21ms <==== **processes killed**
24 graphql-santa:plugin-manager loading runtime of plugin prisma +0ms <==== **runner
☝️ On line 23, a sigterm is sent to the child, yet on line 24, we see it continues its execution, resulting quickly after in an EPIPE
error
Sending a SIGKILL
to the child instead does fix the problem, but sending SIGKILL
is dangerous and cannot be caught by the child process and might leave zombie processes.
Next steps
- Investigate why
SIGTERM
is sometimes ignored (might actually be all the time).- I think one reason might be that our code is run using
new Script().runInThisContext()
whilets-node-dev
uses a simplerequire()
- I think one reason might be that our code is run using
from graphql-framework-experiment.
Related Issues (20)
- TS error with inputObjectType default value when using with list=true
- write test for build showing esnext module type works
- nexus:dev reflection failed HOT 8
- Force include directories in build
- Field in interface not get type generated
- Roadmap is empty HOT 3
- @nexus/schema return wrong error object shape
- Empty errors in production environment
- queryField and mutationField not generating types when used in makeSchema HOT 1
- On main page there is broken link to new handbook of typescript
- No source map when debug
- Add connection to ContextAdderLens
- Missing multipart field ‘operations’ (and other related errors) HOT 1
- TypeError: cookieParser is not a function after upgrading to 0.26.1 HOT 1
- Build error using pnpm
- Parallel testing causes multiple servers on the same port, resulting in jest hanging and failing unpredictably
- unhandledRejection
- Announcing the Sunsetting of Nexus Framework and a New Focus on Nexus Schema
- How do You use socket.io
- [email protected] does not support @prisma/[email protected]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphql-framework-experiment.