realm / realm-graphql-service

GraphQL service for Realm Object Server
https://realm.io
Apache License 2.0
43 stars 10 forks source link

Realm-graphql-service closes the realm and shows weird errors #46

Closed howdyhyber closed 6 years ago

howdyhyber commented 6 years ago

I have a problem here with the realm-graphql-service.

Its randomly happens, sometimes frequent, sometimes appears only once a day.

This is the logs:

0|npm | info: Got signal SIGINT. Shutting down 0|npm | info: Loaded feature token capabilities=[Sync], expires=Wed Apr 19 2017 14:15:29 GMT+0000 (UTC) 0|npm | info: Realm Object Server version 2.8.1 is starting 0|npm | info: [sync] Realm sync server started ([realm-core-5.1.2], [realm-sync-2.2.15]) 0|npm | info: [sync] Directory holding persistent state: /home/ec2-user/xeleqt-object-server/data/sync/user_data 0|npm | info: [sync] Backup mode: master_with_no_slave 0|npm | info: [sync] Log level: info 0|npm | info: [sync] Download log compaction is enabled 0|npm | info: [sync] Max download size: 32000000 bytes 0|npm | info: [sync] Listening on 127.0.0.1:33831 (sync protocol version 22) 0|npm | info: [sync] HTTP Connection[1]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[3]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[5]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[7]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[9]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[10]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[13]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[15]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[16]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[19]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[22]: Connection is closed after HTTP response. 0|npm | info: Realm Object Server has started and is listening on http://0.0.0.0:9080 0|npm | info: [sync] HTTP Connection[25]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[27]: Connection is closed after HTTP response. 0|npm | Error: Cannot access realm that has been closed. 0|npm | at queryResolver.(anonymous function) (/home/ec2-user/xeleqt-object-server/node_modules/realm-graphql-service/dist/service.js:244:40) 0|npm | at resolveFieldValueOrError (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:498:12) 0|npm | at resolveField (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:462:16) 0|npm | at /home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:311:18 0|npm | at Array.reduce () 0|npm | at executeFields (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:308:42) 0|npm | at executeOperation (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:236:122) 0|npm | at executeImpl (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:133:26) 0|npm | at Object.execute (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:110:229) 0|npm | at doRunQuery (/home/ec2-user/xeleqt-object-server/node_modules/apollo-server-core/dist/runQuery.js:122:42) 0|npm | Error: Cannot access realm that has been closed. 0|npm | at queryResolver.(anonymous function) (/home/ec2-user/xeleqt-object-server/node_modules/realm-graphql-service/dist/service.js:244:40) 0|npm | at resolveFieldValueOrError (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:498:12) 0|npm | at resolveField (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:462:16) 0|npm | at /home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:311:18 0|npm | at Array.reduce () 0|npm | at executeFields (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:308:42) 0|npm | at executeOperation (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:236:122) 0|npm | at executeImpl (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:133:26) 0|npm | at Object.execute (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:110:229) 0|npm | at doRunQuery (/home/ec2-user/xeleqt-object-server/node_modules/apollo-server-core/dist/runQuery.js:122:42) 0|npm | Error: Cannot access realm that has been closed. 0|npm | at queryResolver.(anonymous function) (/home/ec2-user/xeleqt-object-server/node_modules/realm-graphql-service/dist/service.js:244:40) 0|npm | at resolveFieldValueOrError (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:498:12) 0|npm | at resolveField (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:462:16) 0|npm | at /home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:311:18 0|npm | at Array.reduce () 0|npm | at executeFields (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:308:42) 0|npm | at executeOperation (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:236:122) 0|npm | at executeImpl (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:133:26) 0|npm | at Object.execute (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:110:229) 0|npm | at doRunQuery (/home/ec2-user/xeleqt-object-server/node_modules/apollo-server-core/dist/runQuery.js:122:42) 0|npm | Error: Cannot access realm that has been closed. 0|npm | at queryResolver.(anonymous function) (/home/ec2-user/xeleqt-object-server/node_modules/realm-graphql-service/dist/service.js:244:40) 0|npm | at resolveFieldValueOrError (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:498:12) 0|npm | at resolveField (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:462:16) 0|npm | at /home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:311:18 0|npm | at Array.reduce () 0|npm | at executeFields (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:308:42) 0|npm | at executeOperation (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:236:122) 0|npm | at executeImpl (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:133:26) 0|npm | at Object.execute (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:110:229) 0|npm | at doRunQuery (/home/ec2-user/xeleqt-object-server/node_modules/apollo-server-core/dist/runQuery.js:122:42) 0|npm | Error: Cannot access realm that has been closed. 0|npm | at queryResolver.(anonymous function) (/home/ec2-user/xeleqt-object-server/node_modules/realm-graphql-service/dist/service.js:244:40) 0|npm | at resolveFieldValueOrError (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:498:12) 0|npm | at resolveField (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:462:16) 0|npm | at /home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:311:18 0|npm | at Array.reduce () 0|npm | at executeFields (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:308:42) 0|npm | at executeOperation (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:236:122) 0|npm | at executeImpl (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:133:26) 0|npm | at Object.execute (/home/ec2-user/xeleqt-object-server/node_modules/graphql/execution/execute.js:110:229) 0|npm | at doRunQuery (/home/ec2-user/xeleqt-object-server/node_modules/apollo-server-core/dist/runQuery.js:122:42) 0|npm | info: Got signal SIGINT. Shutting down 0|npm | info: Loaded feature token capabilities=[Sync], expires=Wed Apr 19 2017 14:15:29 GMT+0000 (UTC) 0|npm | info: Realm Object Server version 2.8.1 is starting 0|npm | info: [sync] Realm sync server started ([realm-core-5.1.2], [realm-sync-2.2.15]) 0|npm | info: [sync] Directory holding persistent state: /home/ec2-user/xeleqt-object-server/data/sync/user_data 0|npm | info: [sync] Backup mode: master_with_no_slave 0|npm | info: [sync] Log level: info 0|npm | info: [sync] Download log compaction is enabled 0|npm | info: [sync] Max download size: 32000000 bytes 0|npm | info: [sync] Listening on 127.0.0.1:46101 (sync protocol version 22) 0|npm | info: [sync] HTTP Connection[1]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[3]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[5]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[7]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[9]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[10]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[13]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[15]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[17]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[18]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[22]: Connection is closed after HTTP response. 0|npm | info: Realm Object Server has started and is listening on http://0.0.0.0:9080 0|npm | info: [sync] HTTP Connection[25]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[27]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[31]: Connection is closed after HTTP response. 0|npm | info: [sync] HTTP Connection[33]: Connection is closed after HTTP response. 0|npm | { FetchError: network timeout at: http://127.0.0.1:46101/xeleqt-production/realms/files/%2Fxeleqt-production 0|npm | at Timeout._onTimeout (/home/ec2-user/xeleqt-object-server/node_modules/node-fetch/index.js:126:13) 0|npm | at ontimeout (timers.js:482:11) 0|npm | at tryOnTimeout (timers.js:317:5) 0|npm | at Timer.listOnTimeout (timers.js:277:5) 0|npm | name: 'FetchError', 0|npm | message: 'network timeout at: http://127.0.0.1:46101/xeleqt-production/realms/files/%2Fxeleqt-production', 0|npm | type: 'request-timeout' }

^[

When this error appears, i really have to restart the ROS, which i think a bad practice.

Thanks in advance for the help :D

howdyhyber commented 6 years ago

Follow up

nirinchev commented 6 years ago

We still don't have a way to reproduce this which hinders any debugging efforts 😔

nirinchev commented 6 years ago

Duplicate of https://github.com/realm/realm-graphql-service/issues/39