Magento2 SOAP error when using storeview ‘all’

We have a pretty strange issue with the Magento2 SOAP API. The SOAP is working, but whenever we use the type ‘CatalogDataProductAttributeInterface’ it will throw an error. But only on our production environment and when using the ‘all’ storeview.

We have four storeviews: 0 admin 1 moon 2 default 3 sun

When we call the SOAP using this URL, the response is 200 OK:

https://www.domain.com/soap/moon?services=catalogAttributeSetRepositoryV1%2CcatalogProductAttributeTypesListV1%2CcatalogProductAttributeRepositoryV1%2CcatalogAttributeSetManagementV1%2CcatalogProductAttributeManagementV1%2CcatalogProductAttributeGroupRepositoryV1%2CcatalogProductAttributeOptionManagementV1 

But when we try to call the SOAP using storeview ‘all’ the response is not OK and a PHP 500 error is given.

https://www.domain.com/soap/all?services=catalogAttributeSetRepositoryV1%2CcatalogProductAttributeTypesListV1%2CcatalogProductAttributeRepositoryV1%2CcatalogAttributeSetManagementV1%2CcatalogProductAttributeManagementV1%2CcatalogProductAttributeGroupRepositoryV1%2CcatalogProductAttributeOptionManagementV1 

And to make things more complicated, when we make an exact copy of database and files, and set it on the staging environment, the SOAP does work with storeview ‘all’.

https://www.domain.com:8443/soap/all?services=catalogAttributeSetRepositoryV1%2CcatalogProductAttributeTypesListV1%2CcatalogProductAttributeRepositoryV1%2CcatalogAttributeSetManagementV1%2CcatalogProductAttributeManagementV1%2CcatalogProductAttributeGroupRepositoryV1%2CcatalogProductAttributeOptionManagementV1 

Questions: 1) Did anyone have this problem before and knows a possible solution?

2) Does anyone have any advise about how to debug the error. The Magento log is empty and also the Nginx error.log does not provide more information than the default php error:

2019/07/30 16:32:00 [error] 11151#11151: *24879 FastCGI sent in stderr: “PHP message: PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn’t load from ‘data://text/plain;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGRlZmluaXRpb25zIHhtbG5zPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93c2RsLyIgeG1sbnM6d3NkbD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3NkbC8iIHhtbG5zOnRucz0iaHR0cHM6Ly93d3cuaGlwcGVzdC1mYXNoaW9uLm5sL3NvYXAvYWxsP3NlcnZpY2VzPWNhdGFsb2dBdHRyaWJ1dGVTZXRSZXBvc2l0b3J5VjElMkNjYXRhbG9nUHJvZHVjdEF0dHJpYnV0ZVR5cGVzTGlzdFYxJTJDY2F0YWxvZ1Byb2R1Y3RBdHRyaWJ1dGVSZXBvc2l0b3J5VjElMkNjYXRhbG9nQXR0cmlidXRlU2V0TWFuYWdlbWVudFYxJTJDY2F0YWxvZ1Byb2R1Y3RBdHRyaWJ1dGVNYW5hZ2VtZW50VjElMkNjYXRhbG9nUHJvZHVjdEF0dHJpYnV0ZUdyb3VwUmVwb3NpdG9yeVYxJTJDY2F0YWxvZ1Byb2R1Y3RBdHRyaWJ1dGVPcHRpb25NYW5hZ2VtZW50VjEiIHhtbG5zOnNvYXA9Imh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzZGwvc29hcC8iIHhtbG5zOnhzZD0iaHR0cDovL3d3dy53My5vcmcvMjAwMS9YTUxTY2hlbWEiIHhtbG5zOnNvYXAtZW5jPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy9zb2FwL2VuY29kaW5nLyIgeG1sbnM6c29hcDEyPSJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93c2RsL3NvYXAxMi8iIG5hbWU9Ik1hZ2VudG” while reading response header from upstream, client: 185.42.84.4, server: domain.com, request: “POST /soap/all?services=catalogAttributeSetRepositoryV1,catalogProductAttributeTypesListV1,catalogProductAttributeRepositoryV1,catalogAttributeSetManagementV1,catalogProductAttributeManagementV1,catalogProductAttributeGroupRepositoryV1,catalogProductAttributeOptionManagementV1 HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “www.domain.com”