Process exited with code null when calling /api/products/upload endpoint

sorawittrongtokitTRIAL

3 months ago

When I call the /api/products/upload endpoint on the application deployed on Railway, I get an error and it shows the message Process exited with code null
error message:
Process exited with code null: Error: Process exited with code null: at ChildProcess.<anonymous> (/app/services/yoloService.js:70:23) at ChildProcess.emit (node:events:517:28) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:303:5)

Things I've tried:

  • Checked that Python and all required dependencies are installed in the Docker container

  • Checked that the script file running in the child process exists and has the correct permissions

  • Added logging to see the output and errors from the child process, but no clear cause was found
    my repository : https://github.com/SorawitTrongtokit/Backend
    sorry for my bad english I'm new to this sorry for this dump mistake but I really need help

Awaiting User Response

3 Replies

sorawittrongtokitTRIAL

3 months ago

FROM node:18

# Install system dependencies as root
USER root
RUN apt-get update && \
    apt-get install -y python3 python3-pip python3-venv build-essential libpq-dev libgl1-mesa-glx && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Set working directory and ownership
WORKDIR /app
RUN chown -R node:node /app

# Switch to non-root user
USER node

# Copy package files and install dependencies
COPY --chown=node:node package.json package-lock.json ./
RUN npm install

# Copy the rest of the application
COPY --chown=node:node . .

# Install Python dependencies in a virtual environment
RUN python3 -m venv /app/venv && \
    /app/venv/bin/pip install --upgrade pip && \
    /app/venv/bin/pip install --no-cache-dir -r requirements.txt

# Expose port and define the startup command
EXPOSE 5000
CMD ["npm", "start"]

this is my dockerfile


sorawittrongtokitTRIAL

3 months ago

When I ssh into my railway project and I cd into /app i does not see anything inside


3 months ago

Hello,

We do not support SSH so I'm not sure how you have achieved that haha.

Please upgrade to the Hobby plan, you are likely running into trial plan limits.

Once on Hobby we can go from there, but as it stands, we won't be able to provide assistance for this while you are on Trial.

Best,
Brody


Status changed to Awaiting User Response railway[bot] 3 months ago


Process exited with code null when calling /api/products/upload endpoint - Railway Help Station