Analyze Docker Runtime Errors logo

Analyze Docker Runtime Errors

Community
dykyi-roman
analyze-docker-runtime-errors

Analyzes Docker runtime errors for PHP containers. Identifies 502 Bad Gateway, OOM kills, connection refused, and permission issues.

Overview

Publisherdykyi-roman
Repositoryawesome-claude-code
Skill nameanalyze-docker-runtime-errors
Stars
98
Forks
25
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dykyi-roman on GitHub. Read the source before you install it.

Installation

Install the Analyze Docker Runtime Errors AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dykyi-roman/awesome-claude-code.git /tmp/awesome-claude-code
mkdir -p .claude/skills
cp -r /tmp/awesome-claude-code/skills/analyze-docker-runtime-errors .claude/skills/analyze-docker-runtime-errors
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Analyze Docker Runtime Errors in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Analyze Docker Runtime Errors on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Analyze Docker Runtime Errors is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Docker Runtime Error Analysis

Analyze running PHP containers for runtime failures and provide targeted diagnosis and fixes.

Runtime Error Categories

ErrorSymptomRoot Cause
502 Bad GatewayNginx returns 502PHP-FPM not running or crashed
OOM KilledContainer restartsmemory_limit or container limit exceeded
Connection refusedService unreachableContainer not ready or wrong network
Permission deniedFile operation failsUID/GID mismatch or read-only fs
Segmentation faultProcess crashesExtension bug or memory corruption
Slow requestsTimeouts, 504 errorsPHP-FPM pool exhaustion

Detection Patterns

1. 502 Bad Gateway (PHP-FPM Not Running)

yaml
# FIX: Add healthcheck and proper depends_on
services:
  php-fpm:
    healthcheck:
      test: ["CMD-SHELL", "php-fpm-healthcheck || exit 1"]
      interval: 10s
      timeout: 5s
      retries: 3
  nginx:
    depends_on:
      php-fpm:
        condition: service_healthy

2. OOM Killed

ini
; php.ini -- match memory_limit to container limit
; Container limit 256MB -> PHP memory_limit should be lower
memory_limit = 128M
yaml
# docker-compose.yml memory constraints
services:
  php-fpm:
    deploy:
      resources:
        limits:
          memory: 512M
        reservations:
          memory: 256M

3. Connection Refused

yaml
# FIX: Proper service dependencies and networking
services:
  php-fpm:
    depends_on:
      redis: { condition: service_healthy }
      database: { condition: service_healthy }
    networks: [app-network]
  redis:
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
    networks: [app-network]
  database:
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
    networks: [app-network]
networks:
  app-network:
    driver: bridge

4. Permission Denied (File Ownership)

dockerfile
# FIX: Set correct ownership in Dockerfile
RUN mkdir -p /var/www/var/cache /var/www/var/log \
    && chown -R www-data:www-data /var/www/var
COPY --chown=www-data:www-data . /var/www
USER www-data

5. PHP-FPM Pool Exhaustion

ini
; Sizing formula: max_children = (available_memory - overhead) / avg_process_memory
; Example: (512MB - 64MB) / 32MB = ~14
[www]
pm = dynamic
pm.max_children = 14
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6
pm.max_requests = 500

6. Segmentation Fault

ini
; Mitigation: disable problematic extensions one by one
; Common cause: OPcache + Xdebug conflict
opcache.enable=0  ; Test if OPcache causes segfault
opcache.fast_shutdown=0

Grep Patterns

bash
# Find PHP-FPM configuration
Grep: "pm\.(max_children|start_servers|max_requests)" --glob "**/www.conf" --glob "**/php-fpm*.conf"

# Find memory_limit settings
Grep: "memory_limit" --glob "**/php.ini" --glob "**/*.ini"

# Find healthcheck definitions
Grep: "healthcheck" --glob "**/docker-compose*.yml"

# Find depends_on without condition
Grep: "depends_on:" --glob "**/docker-compose*.yml"

# Find error logging configuration
Grep: "error_log|log_errors" --glob "**/php.ini" --glob "**/*.ini"

PHP-FPM Specific Diagnostics

Log PatternDiagnosisFix
server reached pm.max_childrenPool exhaustionIncrease max_children or optimize code
child exited on signal 11Segmentation faultCheck extensions, disable OPcache
child exited with code 255Fatal PHP errorCheck error log for details
execution timed outSlow scriptProfile code, check DB queries
unable to open primary scriptWrong document rootFix Nginx fastcgi_param SCRIPT_FILENAME

Severity Classification

PatternSeverityImpact
OOM Killed (recurring)CriticalService unavailable, data loss risk
PHP-FPM pool exhaustionCriticalAll requests blocked
Segmentation faultCriticalProcess crash, intermittent failures
502 Bad GatewayMajorService unavailable
Connection refusedMajorDependent service failures
Permission denied (runtime)MajorFeature degradation
Slow requests (< threshold)MinorUser experience impact

Output Format

markdown
### Runtime Error: [Category]

**Severity:** Critical/Major/Minor
**Container:** `<service_name>`
**Log Pattern:** `<error message from logs>`

**Diagnosis:**
[Root cause analysis with evidence from logs]

**Steps to Verify:**
1. [Command to confirm the issue]
2. [Command to check related state]

**Fix:**
```yaml
# docker-compose.yml or config change

Monitoring: [How to detect this issue early in production]

Frequently asked questions

What does the Analyze Docker Runtime Errors AI skill do?

Analyzes Docker runtime errors for PHP containers. Identifies 502 Bad Gateway, OOM kills, connection refused, and permission issues.

Why use Analyze Docker Runtime Errors on TypingMind?

Because you install it once and use it with any model. Analyze Docker Runtime Errors is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Analyze Docker Runtime Errors in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dykyi-roman/awesome-claude-code/tree/master/skills/analyze-docker-runtime-errors. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Analyze Docker Runtime Errors?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Analyze Docker Runtime Errors?

As many as you like. As long as a model supports skills, you can use Analyze Docker Runtime Errors with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Analyze Docker Runtime Errors AI skill free?

Yes. It is published on GitHub by dykyi-roman under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇