Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime errors since cds version 3.34.1 (Gateway timeout) #80

Open
htammen opened this issue May 19, 2020 · 5 comments
Open

Runtime errors since cds version 3.34.1 (Gateway timeout) #80

htammen opened this issue May 19, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@htammen
Copy link
Contributor

htammen commented May 19, 2020

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

@gregorwolf gregorwolf added the bug Something isn't working label May 20, 2020
@gregorwolf
Copy link
Contributor

This issue is now also filed via the SAP Support Incident: 338393 / 2020

@chgeo
Copy link

chgeo commented Jul 10, 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.

@ghost
Copy link

ghost commented Jul 13, 2020

Hi @chgeo Christian,
An entry will probably look like this, right?

"cds": {
   "i18n.languages": ["de", "en", "fr"]
}

Thanks

@chgeo
Copy link

chgeo commented Jul 13, 2020

Almost:

"cds": {
  "i18n":{
    "languages": ["de", "en", "fr"]
  }
}

@chgeo
Copy link

chgeo commented Aug 25, 2020

This should now be resolved with cds 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants