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

Testing with a real Plone site #133

Closed
ajayns opened this issue Jul 17, 2018 · 12 comments
Closed

Testing with a real Plone site #133

ajayns opened this issue Jul 17, 2018 · 12 comments

Comments

@ajayns
Copy link
Contributor

ajayns commented Jul 17, 2018

@cekk Do mention any issues you have here! I'm also checking out each feature implemented.

This would help us do any minor fixes and be ready to use the plugin with our proposed gatsby-starter-plone.

@cekk
Copy link
Collaborator

cekk commented Jul 18, 2018

i tried to import data from a small plone site (415 items in catalog), and it seems to work very well with the recursion-mode.
The import doesn't take too much and the contents seems to have the correct data.

I have some problems with the pages created from the starter. I'll open some separated issues for this.

@cekk
Copy link
Collaborator

cekk commented Jul 18, 2018

ok, the only problem in the starter, is that here I don't have anything (i don't have a docs folder, so the query returns nothing).

Commenting that line, everything works.
Also breadcrumbs and site actions are ok.
Internal links works
Files are served correctly

@ajayns
Copy link
Contributor Author

ajayns commented Jul 18, 2018

Yes currently, the starter is configured to use it's own docs as a source. So here, at the index page, the plugin displays docs/index.md. This is not an error but it's cause of the specific config we have for the gatsby-site for our use.

@cekk
Copy link
Collaborator

cekk commented Jul 22, 2018

Another try with 30000 objects and ~15gb of blobs: failed.

After a few hours, I run out of memory.

@datakurre
Copy link
Collaborator

datakurre commented Jul 22, 2018 via email

@datakurre
Copy link
Collaborator

As we delegate file nodes to gatsby-source-filesystem, I wonder, how could it be that blobs still way memory? Just JSON should not take that much...

@cekk
Copy link
Collaborator

cekk commented Jul 22, 2018

just for reference, this is the traceback:

Creating file nodes

<--- Last few GCs --->

[84778:0x102804c00] 17342052 ms: Mark-sweep 1403.1 (1496.1) -> 1403.1 (1496.1) MB, 2228.2 / 0.0 ms  allocation failure GC in old space requested
[84778:0x102804c00] 17344832 ms: Mark-sweep 1403.1 (1496.1) -> 1402.9 (1464.6) MB, 2779.4 / 0.0 ms  last resort GC in old space requested
[84778:0x102804c00] 17347313 ms: Mark-sweep 1402.9 (1464.6) -> 1402.9 (1464.6) MB, 2480.6 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x2b8922725549 <JSObject>
    1: putTask [/Users/cekk/Documents/workspace/gatsby-source-plone/node_modules/better-queue/lib/queue.js:~375] [pc=0x1449a9907b76](this=0x2b89418065d9 <JSGlobal Object>)
    2: updateTask [/Users/cekk/Documents/workspace/gatsby-source-plone/node_modules/better-queue/lib/queue.js:~399] [pc=0x1449a990d2f6](this=0x2b89418065d9 <JSGlobal Object>)
    3: _onTimeout [/Users/cekk/Documents/workspace/...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 2: node::FatalTryCatch::~FatalTryCatch() [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 4: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 5: v8::internal::HashTable<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::EnsureCapacity(v8::internal::Handle<v8::internal::NameDictionary>, int, v8::internal::PretenureFlag) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 6: v8::internal::Dictionary<v8::internal::NameDictionary, v8::internal::NameDictionaryShape>::Add(v8::internal::Handle<v8::internal::NameDictionary>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyDetails, int*) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 7: v8::internal::LookupIterator::ApplyTransitionToDataProperty(v8::internal::Handle<v8::internal::JSObject>) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 8: v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::Object::ShouldThrow, v8::internal::Object::StoreFromKeyed) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
 9: v8::internal::Runtime_SetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/cekk/.nvm/versions/node/v9.10.0/bin/node]
10: 0x1449a86042fd
make: *** [develop] Abort trap: 6

@ajayns
Copy link
Contributor Author

ajayns commented Jul 22, 2018

I haven't much explored optimization and handling such huge sites yet, I'll do some research and get back.

cc @m-allanson @pieh insights appreciated

@pieh
Copy link

pieh commented Jul 22, 2018

This might be something we currently are actually working on (but might not be) - see gatsbyjs/gatsby#6611 and gatsbyjs/gatsby#6656

Nodes itself aren't taking that much memory - but serialization is problematic when there is a lot of nodes. There were some fixes recently published already, so try updating gatsby to beta-55

@datakurre
Copy link
Collaborator

@pieh Thanks for the update.

@cekk @ajayns I believe that for now it's good enough for us to acknowledge that with large amount of nodes, memory issues are expected, and target for smaller sites instead, until it is sure that gatsby itself should scale.

Until that, instead of optimizing too early, we probably should look into using gatsby cache #136 to make updating sites with 1-10k pages practical.

@cekk
Copy link
Collaborator

cekk commented Jul 23, 2018

@datakurre i agree.
Mine was only a "stress test".
An ideal site candidate is more like the first one.

Do we need more tests or can close this issue?

@datakurre
Copy link
Collaborator

@cekk It was a great stress test and found real issues.

Let's close this and run more tests once we have the starter. I hope to have implemented caching support by then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants