1

I want to run ghost on GAE standard environment. But I can not it. What is happens?

server.js

const ghost = require('ghost');
const port = process.env.PORT || 8080;

ghost().then(function (ghostServer) {
    ghostServer.rootApp.listen(port);
});

Error Messages

INFO This request caused a new process to be started for your application and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.

ERROR A problem was encountered with the process that handled this request, causing it to exit. This is likely to cause a new process to be used for the next request to your application. (Error code 204)
mats
  • 11
  • 2

2 Answers2

1

I've gotten Error code 204 once before. It was when I discovered a memory leak in app engine's version of python's ssl library that was crashing my instances every few minutes. I had to work with Google Cloud Support to figure that out.

I've experienced another issue where I had to change the source code of a python lib because it would try to bind to a port and fail. That was actually fine because it failed gracefully, the problem I was trying to solve being that it would sometimes hang for 10 minutes.

According to this, NodeJS on GAE Standard is in beta:

This is a beta release of Node.js in the Google App Engine standard environment. This feature might be changed in backward-incompatible ways and is not subject to any SLA or deprecation policy.

So I would wouldn't stray too far from the example app they provided:

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/appengine/hello-world/standard

Options

  1. If possible, just stick with Express on GAE Standard
  2. If you need to use Ghost, consider switching to GAE Flex
  3. If you're dead-set on using Ghost on GAE Standard, use Express like they did in the example, but set it up as an adapter to ghost. Have a single Express request handler that feeds requests into Ghost and passes the responses from ghost back (in fact this feature requests sounds like what I'm trying to describe https://github.com/TryGhost/Ghost/issues/827)
Alex
  • 5,141
  • 12
  • 26
  • Thank you for your answer. I choose and tried "3". But it does not work. I think there was the bad system call in "ghost". – mats Jul 03 '18 at 06:34
0

"Error 204" is not mentioned in Google's public documentation at the moment so I recommend you to go directly to the tech support with this issue. Follow this link and provide your Project Number.

Note: Project Number and Project ID are not the same, the later is considered PII and should not be shared publicly.

A.Queue
  • 1,549
  • 6
  • 21