cap-community
cap-community copied to clipboard
Runtime errors since cds version 3.34.1 (Gateway timeout)
We have a huge service which results in a OData edmx file-size of appr. 3.5 MB. Before cds version 3.34.1 it was slow but there was a response after some time. Since we updated to version 3.34.1 we regularly get a 504 - gateway timeout error when the ../$metadata is invoked. My guess is that It's because of a change in i18n handling. When mta archive is buld the i18n.properties files are combined into a JSON file called i18n.json which is placed into the folder "gen/srv/srv/_i18n". Before 3.34.1 this file had a size of appr. 2.5 MB. Now the size is appr. 25 MB. This is because in the old json file only those languages were included for which we provided a properties file (de and en). Now there are many more (~ 25) languages included (e.g. ar, cs, da, de, en, es, fi, fr, hu, ..., zh_CN, zh_TW) This file seems to be used when the generating the OData metadata file. My guess is that it comes to the gateway timeout cause both files (edmx and i18n.json) have a large size and this takes time when merging information of those.
We are using the "@sap/cds-odata-v2-adapter-proxy": "^1.4.30". Maybe the problem is related to this package?
Can you please check this? Can I restrict cds to generate only the languages I need in my application?
Thanks Helmut
This issue is now also filed via the SAP Support Incident: 338393 / 2020
With the CAP 4.0 release in July, you can use i18n.languages
configuration to restrict the set of languages. This influences both the i18n.json and the number of edmx files that the build produces for Java.
Hi @chgeo Christian, An entry will probably look like this, right?
"cds": {
"i18n.languages": ["de", "en", "fr"]
}
Thanks
Almost:
"cds": {
"i18n":{
"languages": ["de", "en", "fr"]
}
}
This should now be resolved with cds 4