craftcms / craftcms/cms

[3.x]: ETIMEDOUT after graphql requests

Open
#13,135 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug craft3
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

What happened?
Description

I'm using craft's graphql to generate a static site with a nuxt frontend. The generator manages to generate about 40 routes, then it returns

Error: Network error: request to https://geo-api.heimatschutz.ch/api failed, reason: connect ETIMEDOUT

and it doesn't generate the rest of the routes. Is there some configuration within craft that limits how many requests the api can receive? My php max_execution_time is already 30 seconds, I don't think that's the problem. but maybe there are other PHP variables I haven't thought about. The error is being thrown by apollo.

Thanks for any suggestions.

Steps to reproduce
  1. set up craft graphql with some entry types and at least 50 entries
  2. set up a nuxt frontend
  3. run nuxt generate for custom routes in nuxt.config.js
Expected behavior

my routes would all be generated

Actual behavior

Error: Network error: request to https://geo-api.heimatschutz.ch/api failed, reason: connect ETIMEDOUT

Craft CMS version

Craft Pro 3.7.42

PHP version

7.4.33

Operating system and version

FreeBSD 12.4-RELEASE-p2

Database type and version

MySQL 5.5.5

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.0-62)

Installed plugins and versions

nethooks | 1.1.2
Redactor 2.8.8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Craft GraphQL and Nuxt generate setup with at least 50 entries and custom routes, then inspect where the Apollo request to the reported API times out. The issue is resolved when the cause of the timeout or request limit is established and a verified configuration change or fix allows all routes to generate.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, nuxtjs, php
Domain
api, backend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.