Skip to content

Troubleshooting

Common issues when working with можно. and how to solve them.

SDK

SDK Cannot Connect to the Server

Symptom: client fails to start, start() throws an exception or the Promise is rejected.

Causes and solutions:

CauseSolution
Wrong server URLCheck mozhnoUrl / url. Must be a full URL with protocol.
Invalid API keyCheck apiKey. The key is shown only once on creation — create a new one if lost.
Server is unreachablecurl http://localhost:8080/actuator/health. No response means the server is not running.
Environment mismatchAPI key is bound to an environment. A key from dev cannot access production.
Network restrictionsCheck firewall, VPN, proxy.

Flag Always Returns false

Causes:

CauseSolution
Flag is archivedRestore the flag: POST /api/v1/flags/{id}/unarchive
Strategy is disabledCheck in the dashboard: enabled: true
Context does not matchCheck context attributes and targeting rules
Flag does not existCheck for typos in the key. isEnabled returns false for unknown flags.
Cache is staleWait for the polling interval (15 sec) or restart the SDK

Flags Not Updating After Dashboard Changes

Cause: polling interval.

Solution:

  • By default, the SDK polls the server every 15 seconds
  • Wait for the next polling cycle
  • Reduce fetchTogglesInterval / refreshInterval (but not below 5 seconds)
  • For instant effect, use Kill Switch

SDK Throws an Exception on Start

In Java SDK with synchronousFetchOnInitialisation(true):

java
// If the server is unreachable, this throws an exception
MozhnoConfig config = MozhnoConfig.builder()
    .synchronousFetchOnInitialisation(true)  // <-- this is the cause
    .build();

Solution: wrap in try/catch or disable synchronous fetch (SDK will continue background retries).

Authentication

"401 UNAUTHORIZED" on All Requests

CauseSolution
JWT expired (15 min)Refresh via POST /api/v1/auth/refresh
Refresh token expired (30 days)Log in again
TOKEN_REUSEYour refresh token was reused (possible compromise). Log in again.
Wrong header formatMust be Authorization: Bearer <token>

"403 FORBIDDEN"

RoleAccess
VIEWERRead-only. Cannot create/modify flags.
DEVELOPERCannot manage users and API keys.

Request a role upgrade from an ADMIN.

Database

Server Won't Start: "Connection Refused"

Cause: PostgreSQL is unreachable.

Solution:

  1. Check SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME, SPRING_DATASOURCE_PASSWORD
  2. Ensure PostgreSQL is running: pg_isready -U flags_user -d feature_flags
  3. In Docker: check depends_on: postgres: service_healthy

Flyway Migrations Not Applied

Symptom: liquibase errors or tables not created.

Solution:

  1. Check SPRING_FLYWAY_ENABLED=true
  2. Check SPRING_FLYWAY_LOCATIONS=classpath:db/migration
  3. Review the flyway_schema_history table in the database — see if entries exist

Metrics

Metrics Not Showing in Dashboard

CauseSolution
disableMetrics: true in SDKRemove or set to false
Interval has not passed yetMetrics are sent every 60 seconds
CLIENT_MAX_METRICS_PER_KEY exceededIncrease the limit or delete old metrics

Sparkline Chart Is Empty

Metrics accumulate over time. Let the SDK run for at least 5–10 minutes for data to appear.

Rate Limiting

"429 RATE_LIMIT_EXCEEDED"

You have exceeded the request limit. Limits:

OperationLimit
Login5 attempts per minute
Password reset / invite3 attempts per hour
Token refresh10 attempts per minute
SDK requests1000 per minute
Admin write operations100 per minute

Solution: wait for the next refill interval or increase limits via environment variables.

Deployment

Docker Container Keeps Restarting

Causes:

  1. Database is not ready — increase start_period in healthcheck
  2. JWT_SECRET is not set in production
  3. Insufficient memory — check docker stats, increase deploy.resources.limits.memory

502 / 504 Behind a Reverse Proxy

Increase proxy timeouts:

nginx
proxy_read_timeout 60s;
proxy_connect_timeout 10s;

Released under the AGPL v3.0 License.