Rusty595

Blue Axle Pin with Friction is available in so many sets it causes a time-out

Recommended Posts

When trying to access this page, I consistently receive a long delay, followed by a 504 error (gateway time-out) from Cloudflare: http://rebrickable.com/parts/43093/technic-axle-pin-with-friction-ridges-lengthwise/1/ (LEGO PART 43093: Technic Axle Pin with Friction Ridges Lengthwise - Blue)

The Cloudflare Ray ID given is 36f0360b336f69f5

Repro steps: try and visit the page from the link above, or by navigating to the page through the website as usual

This error occurred for me when using Chrome 58.0.3029.110 (64-bit), but not when using Microsoft Edge 38.14393.1066.0, both on Windows 10 Home 64-bit (v1607 Build 14393.1198)

Share this post


Link to post
Share on other sites

there is several very common parts that cause this. try a black 1x2 plate or some of the other common bricks/plates. i think the queries need to be preprocessed or limited to work on these.

Share this post


Link to post
Share on other sites

I think it depends on how busy the site (and therefore the servers are). At quiet times such as when the US sleeps (morning in Europe) the site works better.

@biodreamer, I think you are right. Either have some sort of cache which stores the sets or retrieve just the first 48 sets and wait for the user to click next before loading more. The delay when clicking next suggest the server is retrieving the entire list every time you load a page which seems remarkably inefficient. I assume that @Nathan is aware of these ongoing issues and will implement a better solution when time allows.

Share this post


Link to post
Share on other sites

Well, this morning the pages didn't load either (here in the EU), so... I don't think it has a lot to do with US being awake or asleep though.

I would agree it looks like something like that is happening yeah, but I don't know if it's the actual loading of the 'sets (or mocs) with this part' or if it's the loading of extra details of the sets with the part. Or maybe it's just something completely else, we don't have all the inside info that Nathan has haha.

Don't know the full workings of the site, but I would think it would be relatively easy to fix/improve by limiting the query to only fetch items between the page*page_size and (page*page_size) + page. For example something like [96:144]. As far as I know queryset slicing limits the actual query performed on the database. Of course this doesn't take in account the fact that a set can be added right before a user presses 'next page', but chances of that are slim and I don't expect anyone to really notice.

But, I'm just guessing a bit here, let's just wait what Nathan has to say. ;)

Share this post


Link to post
Share on other sites

The problem is with the filters (and to a lesser degree the sorting). It only shows the first 48 sets but needs to look at all the results to determine what filters to show in the left sidebar. This particular problem has arisen because I recently fixed a problem with showing the set tags in the sidebar. I've improved it a little, but it hasn't fixed the worst cases yet (e.g. blue 43093).

Share this post


Link to post
Share on other sites

The filters being an issue makes sense. I often open up that page for a part with any sets because I want to see which of the sets I own. I don't normally care if it's such a common set but if I do I'll manually add a filter to the URL to get it working.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now