Troubleshooting¶
/actuator/health returns 404¶
The module was not discovered. Check:
pico-actuatoris installed in the same environment as the app (pip show pico-actuator).- You boot with
pico_boot.init(...), notpico_ioc.init(...)— only pico-boot reads thepico_boot.modulesentry point. With plain pico-ioc, addpico_actuatortomodules=yourself. - Auto-discovery is not disabled (
PICO_BOOT_AUTO_PLUGINS=falsein the environment turns it off).
My indicator does not show up under components¶
- The class must be decorated with
@componentand live in a scanned module (one of themodules=passed toinit, or a subpackage). - It must satisfy the protocol: a
nameattribute and acheck()method. A typo likechecks()fails silently — the class simply is not collected.
Health returns 503 but every component says UP¶
show_components: false hides the detail while an indicator is still DOWN. Temporarily re-enable it to see which one:
Settings from application.yaml are ignored¶
The YAML must be handed to the container explicitly:
from pico_ioc import YamlTreeSource, configuration
config = configuration(YamlTreeSource("application.yaml"))
container = init(modules=["myapp"], config=config)
init(modules=[...]) alone does not read any config file.
An indicator reports "timed out after 5.0s"¶
Its check() exceeded actuator.check_timeout_seconds (default 5s). Raise the budget for legitimately slow probes:
Or better, keep the health probe cheap and cache the expensive part (see the cookbook). Note that a timed-out sync check keeps running in its worker thread until it finishes on its own — the endpoint answers, but the thread is not cancellable. Prefer async checks for probes that can hang indefinitely.
/actuator/metrics answers 501¶
The metrics extra is not installed: