Forum Discussion

tolparow's avatar
tolparow
Occasional Visitor
8 months ago

Prism takes too long to start up

It takes quite a long time (8-10 minutes) to initialize Prism mock server.
All that is logged during this initialization is this message.

> [CLI] …  awaiting  Starting Prism…

No log verbosity level setting helps to understand which specific stage of setup takes that long to perform.

A swagger.yaml file is quite large, having 380+ type definitions described on 10k+ strings and 290+ paths on 14k+ strings. The mock server from this file is not even starting on cloud Stoplight Workspace I created.

The questions are

  1. Is it a usual case it takes so long to startup a mock server?
  2. Are there any hacks that can help speed up the process?
    1. Is there a way to cache the state of the server?
    2. Can it be run concurrently?

The only approach to speed it up I can think of right now is to split the file on several subdomains (e. g. by paths' first term) and run several prism instances and aggregate them on a single port by using docker compose, as described in the documentation.

Have anyone stumbled on a similar issue? Are there better approaches?
Thanks!

No RepliesBe the first to reply