{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
0
Question by Ankit Kumar Singha · Oct 01, 2018 at 09:47 AM · 106 Views node.jsnodeinternal error

Sporadic/Intermittent issues with node js

Hi All,

I came across a scenario where a proxy is developed using mostly node js.

So, while running the same using postman the result is sporadic.

For eg. out of 10 runs I get 3-4 times "500 Internal Sever Error",

{ "fault": { "faultstring": "Script node executed prematurely:..............

.................................

.....................,

"detail": { "errorcode": "scripts.node.runtime.ScriptExitedError" }

}

}

Comment
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Close

1 Answer

  • Sort: 
avatar image
0
Best Answer

Answer by Dino-at-Google   · Oct 01, 2018 at 11:24 PM

ScriptExitedError

means your script exited.

This often happens if you have a runtime exception in your code, which is not caught.

Uncaught exceptions will lead to the script exiting.

To address this, track down and handle the uncaught exception.

Eg, you may wish to add something like this to your nodejs module to document WHERE the code is getting an exception.

process.on('exit', function (code) {
   console.log('Script terminating with code %s', code);
});
process.on('uncaughtException', function (err) {
    console.log(err.stack);
});

That won't solve the problem, but it will help you identify the source of the problem.

BTW, To actually SEE the output of these handlers, you need to look into the nodejs logs. Use the Apigee Admin UI to view those.

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image malagarsamy · Oct 02, 2018 at 11:27 PM 0
Link

Hi @Dino-at-Google

Even I'm facing the same intermittent issue. The node proxy was running fine till this time.

I see the following in from Node.js logs

*** Starting script *** syntax error syntax error at module.js:439 at module.js:474 at module.js:356 at module.js:312 at module.js:497 at startup (trireme.js:142) at trireme.js:923

avatar image Dino-at-Google ♦♦ malagarsamy   · Oct 03, 2018 at 07:19 PM 0
Link

I think your issue is COMPLETELY DIFFERENT.

Your problem appears to be that you're using a dependency that is not compatible with trireme, which requires node 0.10.32.

If you use ES6 or any npm module that uses ES6, you will see this error at runtime. It is completely different than the original proiblem reported here.

Check your dependencies. Search the community archive for more information.

ps: I moved your comment to a COMMENT. You had originally posted it as an ANSWER. It's not an answer.

Follow this Question

Answers Answers and Comments

90 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Node app fails 3 Answers

Connecting to a TLS-protected endpoint (OpenTracing) from Apigee Edge 1 Answer

ok to have single api proxy with both node.js and regular target endpoints? 1 Answer

Node.js APIs and load 3 Answers

node script error during high load conditions 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges