craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.21k stars 623 forks source link

[4.x]: Graph QL asset field query of matrix block is responding as fatal error #13779

Open market-south opened 11 months ago

market-south commented 11 months ago

What happened?

Description

We use Graph QL to query assets in matrix blocks of an entry based on user selection in the front end. It was running smoothly until upgrading to 4.5.6.1. Since the upgrade querying asset in a matrix blocks results in a fatal error. But there is another standalone asset field in the section where querying it is responding as expected.

We have a staging site that runs on Craft 4.2.5.2 where the same query is responding as expected.

Steps to reproduce

  1. Install Craft 4.5.6.1
  2. Navigate to Graph QL explorer
  3. use Graph QL query to retrieve asset field in a matrix block

Expected behavior

The response should include an array of asset details or an empty array

Request

query findProductsBySite($site: [QueryArgument]) {
  productsEntries(siteId: $site) {
    ... on products_products_Entry {
      id
      title
      productFeaturedImage {
        ... on images_Asset {
          id
          title
        }
      }
      productVariants {
        ... on productVariants_variants_BlockType {
          id
          stockcode
          productImages {
            ... on images_Asset {
              id
            }
          }
        }
      }
    }
  }
}

Response

{
  "data": {
    "productsEntries": [
      {
        "id": "12944275",
        "title": "test",
        "productVariants": []
      },
      {
        "id": "12936742",
        "title": "724",
        "productVariants": [
          {
            "id": "12936743",
            "stockcode": "724-11-5-SC",
            "productImages": []
          },
          {
            "id": "12936744",
            "stockcode": "724-11-5-PC",
            "productImages": []
          },
          {
            "id": "12936745",
            "stockcode": "724-11-5-BN",
            "productImages": []
          },
          {
            "id": "12936746",
            "stockcode": "724-11-0-SC",
            "productImages": []
          },
... so on

Actual behavior

{
  "name": "PHP Fatal Error",
  "message": "A server error occurred.",
  "code": 1,
  "error": "A server error occurred."
}

Craft CMS version

4.5.6.1

PHP version

8.1

Operating system and version

Linux 5.4.0-155-generic

Database type and version

MySQL 5.7.32

Image driver and version

Imagick (ImageMagick 6.9.10-23)

Installed plugins and versions

i-just commented 11 months ago

Hi, thanks for reaching out! Any chance you could please post the error details from the logs for this? I’m having a hard time getting it to error using your query.

market-south commented 10 months ago

Hi, Thanks for the reply.

As per the PHP error log, seems like the memory limit is exhausted, but the staging site is also using 256M memory limit and actually has more number of products in response than the production site. Tried clearing all caches under Utilities

I have also attached a screen record if it helps

https://github.com/craftcms/cms/assets/91921916/f8c63e7d-d1d5-4df1-a052-dfb15c01f611

PHP error log

[06-Oct-2023 08:54:08 Pacific/Auckland] An Error occurred while handling another error:
yii\web\HeadersAlreadySentException: Headers already sent. in /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php:369
Stack trace:
#0 /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php(342): yii\web\Response->sendHeaders()
#1 /container/application/Windsor/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\web\Response->send()
#2 /container/application/Windsor/vendor/craftcms/cms/src/web/ErrorHandler.php(192): yii\web\ErrorHandler->renderException(Object(yii\web\HeadersAlreadySentException))
#3 /container/application/Windsor/vendor/yiisoft/yii2/base/ErrorHandler.php(152): craft\web\ErrorHandler->renderException(Object(yii\web\HeadersAlreadySentException))
#4 /container/application/Windsor/vendor/craftcms/cms/src/web/ErrorHandler.php(66): yii\base\ErrorHandler->handleException(Object(yii\web\HeadersAlreadySentException))
#5 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\web\HeadersAlreadySentException))
#6 {main}
Previous exception:
yii\web\HeadersAlreadySentException: Headers already sent. in /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php:369
Stack trace:
#0 /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php(342): yii\web\Response->sendHeaders()
#1 /container/application/Windsor/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#2 /container/application/Windsor/web/index.php(21): yii\base\Application->run()
#3 {main}
[06-Oct-2023 08:54:43 Pacific/Auckland] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) in /container/application/Windsor/vendor/yiisoft/yii2/di/Container.php on line 411
[06-Oct-2023 08:54:46 Pacific/Auckland] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) in /container/application/Windsor/vendor/yiisoft/yii2/di/Container.php on line 411

Web log

2023-10-05 19:54:08 [web.ERROR] [yii\web\HeadersAlreadySentException] Headers already sent. {"trace":["#0 /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php(342): yii\\web\\Response->sendHeaders()","#1 /container/application/Windsor/vendor/yiisoft/yii2/base/Application.php(390): yii\\web\\Response->send()","#2 /container/application/Windsor/web/index.php(21): yii\\base\\Application->run()","#3 {main}"],"memory":4066888,"exception":"[object] (yii\\web\\HeadersAlreadySentException(code: 0): Headers already sent. at /container/application/Windsor/vendor/yiisoft/yii2/web/Response.php:369)"} 
2023-10-05 19:54:08 [web.WARNING] [application] Request context: {"vars":{"_GET":{"p":"form/captcha"},"_POST":[],"_FILES":[],"_COOKIE":{"CraftSessionId":"3d230eb79b46100da42c3426d326c8fb","CRAFT_CSRF_TOKEN":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","_gcl_au":"1.1.222536010.1696535625","_ga":"GA1.1.1100578371.1696535625","_ga_0QGZM3S39L":"GS1.1.1696535633.1.0.1696535641.0.0.0","_ga_BPW5JR9KCZ":"GS1.1.1696535625.1.1.1696535647.0.0.0"},"_SESSION":{"bd62416aa8538ede709019a5e113eea5__flash":[],"captcha_text":"DN9M97"},"_SERVER":{"PATH":"/container/application/node_modules/.bin:/container/application/public/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME":"71530a8053ca","DB_HOST":"mysql57","DB_NAME":"windsor","DB_USERNAME":"windsor","DB_PASSWORD":"•••••••••••••••","SECURITY_KEY":"••••••••••••••••••••••••••••••••","DB_DSN":"mysql:host=mysql57;port=3306;dbname=windsor","DB_SCHEMA":"public","DEFAULT_SITE_URL":"https://windsorhardware.co.nz/","VIRTUAL_HOST":"windsorhardware.co.nz,www.windsorhardware.co.nz","CERT_NAME":"windsorhardware.co.nz","TZ":"Pacific/Auckland","NPM_CONFIG_LOGLEVEL":"info","NODE_VERSION":"14.15.4","DEBIAN_FRONTEND":"noninteractive","HOME":"/var/www","LC_CTYPE":"C.UTF-8","SUPERVISOR_ENABLED":"1","SUPERVISOR_SERVER_URL":"unix:///var/run/supervisor.sock","SUPERVISOR_PROCESS_NAME":"php","SUPERVISOR_GROUP_NAME":"php","USER":"www-data","SCRIPT_NAME":"/index.php","REQUEST_URI":"/form/captcha","QUERY_STRING":"p=form/captcha","REQUEST_METHOD":"GET","SERVER_PROTOCOL":"HTTP/1.1","GATEWAY_INTERFACE":"CGI/1.1","REDIRECT_QUERY_STRING":"p=form/captcha","REDIRECT_URL":"/form/captcha","REMOTE_PORT":"41408","SCRIPT_FILENAME":"/var/www/html/Windsor/web/index.php","SERVER_ADMIN":"webmaster@localhost","CONTEXT_DOCUMENT_ROOT":"/var/www/html/Windsor/web","CONTEXT_PREFIX":"","REQUEST_SCHEME":"http","DOCUMENT_ROOT":"/var/www/html/Windsor/web","REMOTE_ADDR":"101.98.67.229","SERVER_PORT":"80","SERVER_ADDR":"172.18.0.2","SERVER_NAME":"windsorhardware.co.nz","SERVER_SOFTWARE":"Apache","SERVER_SIGNATURE":"","HTTP_COOKIE":"CraftSessionId=3d230eb79b46100da42c3426d326c8fb; CRAFT_CSRF_TOKEN=8d872b2f9111f05347971af85576c98b7c40043d4be4733319746e4993870c66a%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A40%3A%22bzJhUynf-HNkqRg9w1PazUrK0_Vf09tuOXYO0r4S%22%3B%7D; _gcl_au=1.1.222536010.1696535625; _ga=GA1.1.1100578371.1696535625; _ga_0QGZM3S39L=GS1.1.1696535633.1.0.1696535641.0.0.0; _ga_BPW5JR9KCZ=GS1.1.1696535625.1.1.1696535647.0.0.0","HTTP_ACCEPT_LANGUAGE":"en-US,en;q=0.9","HTTP_ACCEPT_ENCODING":"gzip, deflate, br","HTTP_REFERER":"https://windsorhardware.co.nz/builders-hub","HTTP_SEC_FETCH_DEST":"image","HTTP_SEC_FETCH_MODE":"no-cors","HTTP_SEC_FETCH_SITE":"same-origin","HTTP_ACCEPT":"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_SEC_CH_UA":"\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"","HTTP_X_FORWARDED_PORT":"443","HTTP_X_FORWARDED_SSL":"on","HTTP_X_FORWARDED_PROTO":"https","HTTP_X_FORWARDED_FOR":"101.98.67.229","HTTP_CONNECTION":"close","HTTP_HOST":"windsorhardware.co.nz","proxy-nokeepalive":"1","SCRIPT_URI":"http://windsorhardware.co.nz/form/captcha","SCRIPT_URL":"/form/captcha","HTTPS":"on","REDIRECT_STATUS":"200","REDIRECT_SCRIPT_URI":"http://windsorhardware.co.nz/form/captcha","REDIRECT_SCRIPT_URL":"/form/captcha","REDIRECT_HTTPS":"on","FCGI_ROLE":"RESPONDER","PHP_SELF":"/index.php","REQUEST_TIME_FLOAT":1696535648.212139,"REQUEST_TIME":1696535648,"ENVIRONMENT":"production","DB_USER":"windsor","DB_TABLE_PREFIX":"","AUSTRALIAN_SITE_URL":"https://windsorhardware.co.nz/au/","GRAPHQL_TOKEN":"••••••••••••••••••••••••••••••••","GRAPHQL_ENDPOINT":"https://staging.marketsouth.co.nz/api","BC_SCOPE":"https://api.businesscentral.dynamics.com/.default","BC_CLIENT_ID":"637a59b7-5894-4d06-8a20-5f8b05f4898f","BC_CLIENT_SECRET":"••••••••••••••••••••••••••••••••••••••••","BC_GRANT_TYPE":"client_credentials","BC_TENANT_ID":"46ca20c0-5ab2-4e50-b149-5dbeea0bb9e6","BC_API_URL":"https://api.businesscentral.dynamics.com/v2.0/","BC_COMPANY":"Windsor%20Architectural%20Hardware","BC_CATEGORY_CODE":"WebsiteWebservice_getItemCategories","BC_LOGIN_CODE":"WebsiteWebservice_getLoginData","BC_PRODUCT_CODE":"WebsiteWebservice_getStockItems","BC_BESTPRICE_CODE":"WebsiteWebservice_getBestPrice","BC_SALESORDER_CODE":"salesOrders","BC_ENVIRONMENT":"PRODUCTION","CRAFT_AUTHOR":"12891731","STRIPE_PUBLIC_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","STRIPE_SECRET_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"}}} 
2023-10-05 19:54:43 [web.ERROR] [yii\base\ErrorException:1] Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) {"trace":["#0 [internal function]: yii\\base\\ErrorHandler->handleFatalError()","#1 {main}"],"memory":263905232,"exception":"[object] (yii\\base\\ErrorException(code: 1): Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) at /container/application/Windsor/vendor/yiisoft/yii2/di/Container.php:411)"} 
2023-10-05 19:54:43 [web.WARNING] [application] Request context: {"userId":1,"sessionId":"79ab4af83e33e87f739c599d597b2c85","body":"{\"query\":\"query findProductsBySite($site: [QueryArgument]) {\\n  productsEntries(siteId: $site) {\\n    ... on products_products_Entry {\\n      id\\n      title\\n      productFeaturedImage {\\n        ... on images_Asset {\\n          id\\n          title\\n        }\\n      }\\n      productVariants {\\n        ... on productVariants_variants_BlockType {\\n          id\\n          stockcode\\n          productImages {\\n            ... on images_Asset {\\n              id\\n            }\\n          }\\n        }\\n      }\\n    }\\n  }\\n}\\n\",\"variables\":{\"site\":1},\"operationName\":\"findProductsBySite\"}","vars":{"_GET":{"p":"admin/actions/graphql/api","site":"default"},"_FILES":[],"_COOKIE":{"__stripe_mid":"5aaa3af1-2909-47ec-b540-ff8448025d57599aa9","_ga_G1K63T10DJ":"GS1.1.1662061420.50.0.1662061420.0.0.0","_ga":"GA1.1.231731347.1642711747","__utma":"259839116.231731347.1642711747.1670883155.1670883155.1","1031b8c41dfff97a311a7ac99863bdc5_username":"d59851ea4cc0fc3a829abe063ebd4261b670d61dd1ca9773b47d3c75896047b0a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:13:\"NakedCreative\";}","_gcl_au":"1.1.1278363834.1696280111","_ga_7YGDZ6YNDX":"GS1.1.1696378563.125.0.1696378563.0.0.0","_ga_BPW5JR9KCZ":"GS1.1.1696473184.45.1.1696474999.0.0.0","_ga_0QGZM3S39L":"GS1.1.1696473183.322.0.1696474999.0.0.0","CraftSessionId":"79ab4af83e33e87f739c599d597b2c85","1031b8c41dfff97a311a7ac99863bdc5_identity":"8dcd8b399097a1c6f247cec5f081e446df153b1df40e14384784cf097d338c8da:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:162:\"[1,\"[\\\"lpFAznjgUjThwYG53LUJQlu1hDbg5CwvHip9aHX_mHcf5B5GOS7kulXz73Hfff1vkfLOfHdOVa4UPJxxljMM4IokffRxeAnYc3r4\\\",null,\\\"22210ca73bf1af2ec2eace74a96ee356\\\"]\",1209600]\";}","CRAFT_CSRF_TOKEN":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"},"_SESSION":{"bd62416aa8538ede709019a5e113eea5__flash":[],"1031b8c41dfff97a311a7ac99863bdc5__token":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__id":1,"__authKey":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__expire":1697745279,"__duration":1209600},"_SERVER":{"PATH":"/container/application/node_modules/.bin:/container/application/public/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME":"71530a8053ca","DB_HOST":"mysql57","DB_NAME":"windsor","DB_USERNAME":"windsor","DB_PASSWORD":"•••••••••••••••","SECURITY_KEY":"••••••••••••••••••••••••••••••••","DB_DSN":"mysql:host=mysql57;port=3306;dbname=windsor","DB_SCHEMA":"public","DEFAULT_SITE_URL":"https://windsorhardware.co.nz/","VIRTUAL_HOST":"windsorhardware.co.nz,www.windsorhardware.co.nz","CERT_NAME":"windsorhardware.co.nz","TZ":"Pacific/Auckland","NPM_CONFIG_LOGLEVEL":"info","NODE_VERSION":"14.15.4","DEBIAN_FRONTEND":"noninteractive","HOME":"/var/www","LC_CTYPE":"C.UTF-8","SUPERVISOR_ENABLED":"1","SUPERVISOR_SERVER_URL":"unix:///var/run/supervisor.sock","SUPERVISOR_PROCESS_NAME":"php","SUPERVISOR_GROUP_NAME":"php","USER":"www-data","SCRIPT_NAME":"/index.php","REQUEST_URI":"/index.php?p=admin/actions/graphql/api&site=default","QUERY_STRING":"p=admin/actions/graphql/api&site=default","REQUEST_METHOD":"POST","SERVER_PROTOCOL":"HTTP/1.1","GATEWAY_INTERFACE":"CGI/1.1","REMOTE_PORT":"57194","SCRIPT_FILENAME":"/var/www/html/Windsor/web/index.php","SERVER_ADMIN":"webmaster@localhost","CONTEXT_DOCUMENT_ROOT":"/var/www/html/Windsor/web","CONTEXT_PREFIX":"","REQUEST_SCHEME":"http","DOCUMENT_ROOT":"/var/www/html/Windsor/web","REMOTE_ADDR":"203.109.245.67","SERVER_PORT":"80","SERVER_ADDR":"172.18.0.2","SERVER_NAME":"windsorhardware.co.nz","SERVER_SOFTWARE":"Apache","SERVER_SIGNATURE":"","HTTP_COOKIE":"__stripe_mid=5aaa3af1-2909-47ec-b540-ff8448025d57599aa9; _ga_G1K63T10DJ=GS1.1.1662061420.50.0.1662061420.0.0.0; _ga=GA1.1.231731347.1642711747; __utma=259839116.231731347.1642711747.1670883155.1670883155.1; 1031b8c41dfff97a311a7ac99863bdc5_username=d59851ea4cc0fc3a829abe063ebd4261b670d61dd1ca9773b47d3c75896047b0a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A13%3A%22NakedCreative%22%3B%7D; _gcl_au=1.1.1278363834.1696280111; _ga_7YGDZ6YNDX=GS1.1.1696378563.125.0.1696378563.0.0.0; _ga_BPW5JR9KCZ=GS1.1.1696473184.45.1.1696474999.0.0.0; _ga_0QGZM3S39L=GS1.1.1696473183.322.0.1696474999.0.0.0; CraftSessionId=79ab4af83e33e87f739c599d597b2c85; 1031b8c41dfff97a311a7ac99863bdc5_identity=8dcd8b399097a1c6f247cec5f081e446df153b1df40e14384784cf097d338c8da%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A162%3A%22%5B1%2C%22%5B%5C%22lpFAznjgUjThwYG53LUJQlu1hDbg5CwvHip9aHX_mHcf5B5GOS7kulXz73Hfff1vkfLOfHdOVa4UPJxxljMM4IokffRxeAnYc3r4%5C%22%2Cnull%2C%5C%2222210ca73bf1af2ec2eace74a96ee356%5C%22%5D%22%2C1209600%5D%22%3B%7D; CRAFT_CSRF_TOKEN=14f474f607db92025da61bb9d941375fbf9ad3800232ea8fddd5f86576526f1aa%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A147%3A%22asoIvp1F3yFmXGydpHBUAXyHZ2WlY-FNf5WW-oSa%7C9654e9ee84dac6bae2b190ace28deacc5c453732b5a165d00fc1187c4f0504faasoIvp1F3yFmXGydpHBUAXyHZ2WlY-FNf5WW-oSa%7C1%22%3B%7D","HTTP_ACCEPT_LANGUAGE":"en-GB,en-US;q=0.9,en;q=0.8,la;q=0.7","HTTP_ACCEPT_ENCODING":"gzip, deflate, br","HTTP_REFERER":"https://windsorhardware.co.nz/admin/graphiql?site=default","HTTP_SEC_FETCH_DEST":"empty","HTTP_SEC_FETCH_MODE":"cors","HTTP_SEC_FETCH_SITE":"same-origin","HTTP_ORIGIN":"https://windsorhardware.co.nz","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_X_CRAFT_GQL_SCHEMA":"*","CONTENT_TYPE":"application/json","HTTP_ACCEPT":"application/json","HTTP_SEC_CH_UA":"\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"","CONTENT_LENGTH":"589","HTTP_X_FORWARDED_PORT":"443","HTTP_X_FORWARDED_SSL":"on","HTTP_X_FORWARDED_PROTO":"https","HTTP_X_FORWARDED_FOR":"203.109.245.67","HTTP_CONNECTION":"close","HTTP_HOST":"windsorhardware.co.nz","proxy-nokeepalive":"1","SCRIPT_URI":"http://windsorhardware.co.nz/index.php","SCRIPT_URL":"/index.php","HTTPS":"on","FCGI_ROLE":"RESPONDER","PHP_SELF":"/index.php","REQUEST_TIME_FLOAT":1696535677.465991,"REQUEST_TIME":1696535677,"ENVIRONMENT":"production","DB_USER":"windsor","DB_TABLE_PREFIX":"","AUSTRALIAN_SITE_URL":"https://windsorhardware.co.nz/au/","GRAPHQL_TOKEN":"••••••••••••••••••••••••••••••••","GRAPHQL_ENDPOINT":"https://staging.marketsouth.co.nz/api","BC_SCOPE":"https://api.businesscentral.dynamics.com/.default","BC_CLIENT_ID":"637a59b7-5894-4d06-8a20-5f8b05f4898f","BC_CLIENT_SECRET":"••••••••••••••••••••••••••••••••••••••••","BC_GRANT_TYPE":"client_credentials","BC_TENANT_ID":"46ca20c0-5ab2-4e50-b149-5dbeea0bb9e6","BC_API_URL":"https://api.businesscentral.dynamics.com/v2.0/","BC_COMPANY":"Windsor%20Architectural%20Hardware","BC_CATEGORY_CODE":"WebsiteWebservice_getItemCategories","BC_LOGIN_CODE":"WebsiteWebservice_getLoginData","BC_PRODUCT_CODE":"WebsiteWebservice_getStockItems","BC_BESTPRICE_CODE":"WebsiteWebservice_getBestPrice","BC_SALESORDER_CODE":"salesOrders","BC_ENVIRONMENT":"PRODUCTION","CRAFT_AUTHOR":"12891731","STRIPE_PUBLIC_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","STRIPE_SECRET_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"}}} 
2023-10-05 19:54:46 [web.ERROR] [yii\base\ErrorException:1] Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) {"trace":["#0 [internal function]: yii\\base\\ErrorHandler->handleFatalError()","#1 {main}"],"memory":263905232,"exception":"[object] (yii\\base\\ErrorException(code: 1): Allowed memory size of 268435456 bytes exhausted (tried to allocate 8192 bytes) at /container/application/Windsor/vendor/yiisoft/yii2/di/Container.php:411)"} 
2023-10-05 19:54:46 [web.WARNING] [application] Request context: {"userId":1,"sessionId":"79ab4af83e33e87f739c599d597b2c85","body":"{\"query\":\"query findProductsBySite($site: [QueryArgument]) {\\n  productsEntries(siteId: $site) {\\n    ... on products_products_Entry {\\n      id\\n      title\\n      productFeaturedImage {\\n        ... on images_Asset {\\n          id\\n          title\\n        }\\n      }\\n      productVariants {\\n        ... on productVariants_variants_BlockType {\\n          id\\n          stockcode\\n          productImages {\\n            ... on images_Asset {\\n              id\\n            }\\n          }\\n        }\\n      }\\n    }\\n  }\\n}\\n\",\"variables\":{\"site\":1},\"operationName\":\"findProductsBySite\"}","vars":{"_GET":{"p":"admin/actions/graphql/api","site":"default"},"_FILES":[],"_COOKIE":{"__stripe_mid":"5aaa3af1-2909-47ec-b540-ff8448025d57599aa9","_ga_G1K63T10DJ":"GS1.1.1662061420.50.0.1662061420.0.0.0","_ga":"GA1.1.231731347.1642711747","__utma":"259839116.231731347.1642711747.1670883155.1670883155.1","1031b8c41dfff97a311a7ac99863bdc5_username":"d59851ea4cc0fc3a829abe063ebd4261b670d61dd1ca9773b47d3c75896047b0a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:13:\"NakedCreative\";}","_gcl_au":"1.1.1278363834.1696280111","_ga_7YGDZ6YNDX":"GS1.1.1696378563.125.0.1696378563.0.0.0","_ga_BPW5JR9KCZ":"GS1.1.1696473184.45.1.1696474999.0.0.0","_ga_0QGZM3S39L":"GS1.1.1696473183.322.0.1696474999.0.0.0","CraftSessionId":"79ab4af83e33e87f739c599d597b2c85","1031b8c41dfff97a311a7ac99863bdc5_identity":"8dcd8b399097a1c6f247cec5f081e446df153b1df40e14384784cf097d338c8da:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:162:\"[1,\"[\\\"lpFAznjgUjThwYG53LUJQlu1hDbg5CwvHip9aHX_mHcf5B5GOS7kulXz73Hfff1vkfLOfHdOVa4UPJxxljMM4IokffRxeAnYc3r4\\\",null,\\\"22210ca73bf1af2ec2eace74a96ee356\\\"]\",1209600]\";}","CRAFT_CSRF_TOKEN":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"},"_SESSION":{"bd62416aa8538ede709019a5e113eea5__flash":[],"1031b8c41dfff97a311a7ac99863bdc5__token":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__id":1,"__authKey":"••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","1031b8c41dfff97a311a7ac99863bdc5__expire":1697745283,"__duration":1209600},"_SERVER":{"PATH":"/container/application/node_modules/.bin:/container/application/public/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","HOSTNAME":"71530a8053ca","DB_HOST":"mysql57","DB_NAME":"windsor","DB_USERNAME":"windsor","DB_PASSWORD":"•••••••••••••••","SECURITY_KEY":"••••••••••••••••••••••••••••••••","DB_DSN":"mysql:host=mysql57;port=3306;dbname=windsor","DB_SCHEMA":"public","DEFAULT_SITE_URL":"https://windsorhardware.co.nz/","VIRTUAL_HOST":"windsorhardware.co.nz,www.windsorhardware.co.nz","CERT_NAME":"windsorhardware.co.nz","TZ":"Pacific/Auckland","NPM_CONFIG_LOGLEVEL":"info","NODE_VERSION":"14.15.4","DEBIAN_FRONTEND":"noninteractive","HOME":"/var/www","LC_CTYPE":"C.UTF-8","SUPERVISOR_ENABLED":"1","SUPERVISOR_SERVER_URL":"unix:///var/run/supervisor.sock","SUPERVISOR_PROCESS_NAME":"php","SUPERVISOR_GROUP_NAME":"php","USER":"www-data","SCRIPT_NAME":"/index.php","REQUEST_URI":"/index.php?p=admin/actions/graphql/api&site=default","QUERY_STRING":"p=admin/actions/graphql/api&site=default","REQUEST_METHOD":"POST","SERVER_PROTOCOL":"HTTP/1.1","GATEWAY_INTERFACE":"CGI/1.1","REMOTE_PORT":"57206","SCRIPT_FILENAME":"/var/www/html/Windsor/web/index.php","SERVER_ADMIN":"webmaster@localhost","CONTEXT_DOCUMENT_ROOT":"/var/www/html/Windsor/web","CONTEXT_PREFIX":"","REQUEST_SCHEME":"http","DOCUMENT_ROOT":"/var/www/html/Windsor/web","REMOTE_ADDR":"203.109.245.67","SERVER_PORT":"80","SERVER_ADDR":"172.18.0.2","SERVER_NAME":"windsorhardware.co.nz","SERVER_SOFTWARE":"Apache","SERVER_SIGNATURE":"","HTTP_COOKIE":"__stripe_mid=5aaa3af1-2909-47ec-b540-ff8448025d57599aa9; _ga_G1K63T10DJ=GS1.1.1662061420.50.0.1662061420.0.0.0; _ga=GA1.1.231731347.1642711747; __utma=259839116.231731347.1642711747.1670883155.1670883155.1; 1031b8c41dfff97a311a7ac99863bdc5_username=d59851ea4cc0fc3a829abe063ebd4261b670d61dd1ca9773b47d3c75896047b0a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A13%3A%22NakedCreative%22%3B%7D; _gcl_au=1.1.1278363834.1696280111; _ga_7YGDZ6YNDX=GS1.1.1696378563.125.0.1696378563.0.0.0; _ga_BPW5JR9KCZ=GS1.1.1696473184.45.1.1696474999.0.0.0; _ga_0QGZM3S39L=GS1.1.1696473183.322.0.1696474999.0.0.0; CraftSessionId=79ab4af83e33e87f739c599d597b2c85; 1031b8c41dfff97a311a7ac99863bdc5_identity=8dcd8b399097a1c6f247cec5f081e446df153b1df40e14384784cf097d338c8da%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A162%3A%22%5B1%2C%22%5B%5C%22lpFAznjgUjThwYG53LUJQlu1hDbg5CwvHip9aHX_mHcf5B5GOS7kulXz73Hfff1vkfLOfHdOVa4UPJxxljMM4IokffRxeAnYc3r4%5C%22%2Cnull%2C%5C%2222210ca73bf1af2ec2eace74a96ee356%5C%22%5D%22%2C1209600%5D%22%3B%7D; CRAFT_CSRF_TOKEN=14f474f607db92025da61bb9d941375fbf9ad3800232ea8fddd5f86576526f1aa%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A147%3A%22asoIvp1F3yFmXGydpHBUAXyHZ2WlY-FNf5WW-oSa%7C9654e9ee84dac6bae2b190ace28deacc5c453732b5a165d00fc1187c4f0504faasoIvp1F3yFmXGydpHBUAXyHZ2WlY-FNf5WW-oSa%7C1%22%3B%7D","HTTP_ACCEPT_LANGUAGE":"en-GB,en-US;q=0.9,en;q=0.8,la;q=0.7","HTTP_ACCEPT_ENCODING":"gzip, deflate, br","HTTP_REFERER":"https://windsorhardware.co.nz/admin/graphiql?site=default","HTTP_SEC_FETCH_DEST":"empty","HTTP_SEC_FETCH_MODE":"cors","HTTP_SEC_FETCH_SITE":"same-origin","HTTP_ORIGIN":"https://windsorhardware.co.nz","HTTP_SEC_CH_UA_PLATFORM":"\"Windows\"","HTTP_USER_AGENT":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","HTTP_SEC_CH_UA_MOBILE":"?0","HTTP_X_CRAFT_GQL_SCHEMA":"*","CONTENT_TYPE":"application/json","HTTP_ACCEPT":"application/json","HTTP_SEC_CH_UA":"\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"","CONTENT_LENGTH":"589","HTTP_X_FORWARDED_PORT":"443","HTTP_X_FORWARDED_SSL":"on","HTTP_X_FORWARDED_PROTO":"https","HTTP_X_FORWARDED_FOR":"203.109.245.67","HTTP_CONNECTION":"close","HTTP_HOST":"windsorhardware.co.nz","proxy-nokeepalive":"1","SCRIPT_URI":"http://windsorhardware.co.nz/index.php","SCRIPT_URL":"/index.php","HTTPS":"on","FCGI_ROLE":"RESPONDER","PHP_SELF":"/index.php","REQUEST_TIME_FLOAT":1696535681.601311,"REQUEST_TIME":1696535681,"ENVIRONMENT":"production","DB_USER":"windsor","DB_TABLE_PREFIX":"","AUSTRALIAN_SITE_URL":"https://windsorhardware.co.nz/au/","GRAPHQL_TOKEN":"••••••••••••••••••••••••••••••••","GRAPHQL_ENDPOINT":"https://staging.marketsouth.co.nz/api","BC_SCOPE":"https://api.businesscentral.dynamics.com/.default","BC_CLIENT_ID":"637a59b7-5894-4d06-8a20-5f8b05f4898f","BC_CLIENT_SECRET":"••••••••••••••••••••••••••••••••••••••••","BC_GRANT_TYPE":"client_credentials","BC_TENANT_ID":"46ca20c0-5ab2-4e50-b149-5dbeea0bb9e6","BC_API_URL":"https://api.businesscentral.dynamics.com/v2.0/","BC_COMPANY":"Windsor%20Architectural%20Hardware","BC_CATEGORY_CODE":"WebsiteWebservice_getItemCategories","BC_LOGIN_CODE":"WebsiteWebservice_getLoginData","BC_PRODUCT_CODE":"WebsiteWebservice_getStockItems","BC_BESTPRICE_CODE":"WebsiteWebservice_getBestPrice","BC_SALESORDER_CODE":"salesOrders","BC_ENVIRONMENT":"PRODUCTION","CRAFT_AUTHOR":"12891731","STRIPE_PUBLIC_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••","STRIPE_SECRET_KEY":"•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••"}}} 
brandonkelly commented 10 months ago

@market-south Can you try increasing your PHP memory limit to 512MB and see if that helps?