We use cookies to make CarphaCom work, to remember your preferences, and to measure performance. You can accept all, reject non-essential cookies, or customise your choice.
Coming Soon1-Click Deployment on Vultr MarketplaceGet notified

Troubleshooting Common Issues

Quick health check

pm2 list
curl -sk https://localhost/health   # nginx → backend health
curl -sk https://localhost/app/api/health

All three services should be online and respond 2xx.

Service won't start

carphacom-backend keeps restarting

pm2 logs carphacom-backend --lines 100

Common causes:

  • Port 9000 in uselsof -i :9000 and kill the squatter.
  • DB unreachable — check pg_isready, restart postgresql.
  • Missing env var — check the relevant .env against the Environment Variables reference.
  • Migration failure — see Plugin install failed below.

carphacom-storefront 502 from nginx

Almost always means the storefront PM2 process isn't running or the build is missing.

pm2 restart carphacom-storefront --update-env
ls /opt/carphacom/current/nextjs-storefront/.next || echo "BUILD MISSING"

If build is missing:

cd /opt/carphacom/current/nextjs-storefront
NODE_OPTIONS='--max-old-space-size=2048' npm run build
pm2 restart carphacom-storefront --update-env

Admin login returns 500

Most common cause: the custom admin_users row is missing for your account.

PGPASSWORD=$DB_PASS psql -h localhost -U medusa medusa_store \
  -c "SELECT id,email,role,is_active FROM admin_users;"

If your email isn't there, add it:

INSERT INTO admin_users (email, role, is_active, permissions)
VALUES ('admin@yourshop.com', 'admin', true, '["dashboard","comenzi","produse",
  "categorii","branduri","inventar","preturi","clienti","promotii","curieri",
  "sync_api","facturare","blog","pagini","media","marketing","seo","google",
  "securitate","loguri","setari","utilizatori"]'::jsonb);

Plugin install fails

pm2 logs carphacom-backend --lines 200 | grep -E 'plugin|migration|install'

Look for:

  • Signature mismatch — Plugin ZIP wasn't signed by an approved vendor key. Re-download.
  • Migration error — Look at the SQL error. Often a column collision with an existing table; contact the plugin vendor.
  • could not determine executable to run — Plugin manifest has migrations: true but the plugin doesn't ship a Medusa migration. Set migrations: false in carphacom_mp_version.manifest jsonb on the marketplace side, or as a workaround update it locally.

Storefront shows wrong currency

The visitor's region is detected via cookie + URL prefix. Force-clear:

  1. Clear cookies for the shop domain.
  2. Open https://shop.example.com/<correct-locale> (e.g. /ro).
  3. The new region is set and prices update.

If wrong currency persists across all visitors, check Settings → Regions → [region] — maybe the wrong currency is configured.

Slow checkout

# Database slow queries?
PGPASSWORD=$DB_PASS psql -h localhost -U medusa medusa_store \
  -c "SELECT pid,state,query_start,query FROM pg_stat_activity WHERE state = 'active';"

# Redis up?
redis-cli ping

Common causes:

  • Missing DB indexes after a schema change. Run VACUUM ANALYZE on cart, cart_line_item, order, customer.
  • Stripe latency — check pm2 logs for slow POST stripe.com calls. May be regional; consider a closer Stripe region.
  • Backend swapping — check free -h. Add RAM if backend is over 80% utilization.

Where to get help

  • Logs: pm2 logs --lines 500 and tail -f /opt/carphacom/shared/logs/*.log.
  • Community forum: community.carphacom.com.
  • Commercial support: support@carphacom.com (response within 1 business day).