drupal site times out upon uploading big swagger 2.0 file

Not applicable

I'm attempting to upload a large swagger2.0.json file to our drupal developer portal. I encounter a timeout error:

"The Website encountered an error. Please try again later"

I'd like to avoid this timeout error. I added to `settings.php`:

ini_set('max_execution_time', 3600);

but timeout still occurs after 30 seconds.

Solved Solved
0 6 669
2 ACCEPTED SOLUTIONS

Today, SmartDocs is built on top of our own internal representation of API descriptions such as WADL or OpenAPI (formerly known as "Swagger"). This meta-model was a prudent choice when it wasn't possible to predict a winner in the API description format wars, but much has changed since then.

Since SmartDocs was launched, the OpenAPI Specification format has emerged as the industry standard. Apigee is shifting its strategy away from the current meta-model, to a model that depends directly on an OpenAPI spec. This will simplify things by removing the meta-model, avoiding a layer of abstraction and making templating simpler and bringing greater fidelity to the OpenAPI specification.

For this reason, we are not planning to address edge cases such as large spec files failing to import. We recommend splitting up such large specs into separate files and using those smaller files to work around issues like this one. When the next generation of SmartDocs arrives, it should be more efficient and better equipped to render docs from large specs.

View solution in original post

Not applicable
6 REPLIES 6

@jasonbrown , Is it onpremises / cloud ? How big is the swagger file ? Are you sure it's drupal time out rather Smartdocs Modelling API timeout ? I doubt it's API timeout, Keep us posted.

Anil - the swagger 2.0 document is 42kb and has 250 paths. It is hosted in cloud.

Today, SmartDocs is built on top of our own internal representation of API descriptions such as WADL or OpenAPI (formerly known as "Swagger"). This meta-model was a prudent choice when it wasn't possible to predict a winner in the API description format wars, but much has changed since then.

Since SmartDocs was launched, the OpenAPI Specification format has emerged as the industry standard. Apigee is shifting its strategy away from the current meta-model, to a model that depends directly on an OpenAPI spec. This will simplify things by removing the meta-model, avoiding a layer of abstraction and making templating simpler and bringing greater fidelity to the OpenAPI specification.

For this reason, we are not planning to address edge cases such as large spec files failing to import. We recommend splitting up such large specs into separate files and using those smaller files to work around issues like this one. When the next generation of SmartDocs arrives, it should be more efficient and better equipped to render docs from large specs.

Marsh - checkout my screenshot below; I think that may solve it.

Good point, that can help, and I should have mentioned it first!

Not applicable