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

Lots of 404 errors, website goes dark #8

Closed
mjhorvath opened this issue Aug 20, 2018 · 10 comments

Comments

@mjhorvath
Copy link

commented Aug 20, 2018

I installed the latest GitHub version. My first model loads eventually, but there are dozens of 404 errors in Chrome's Developer Tools.

http://isometricland.net/brigl/ldr_redrockracer.php

If I try a larger model, it does not load properly, and eventually results in my whole website becoming unresponsive for 15 minutes or thereabout.

http://isometricland.net/brigl/ldr_carriagehouse.php

@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

The red rock racer never loads for me. It looks to me like it is not finding any of the parts. What is the layout of your parts directory on your web-server? Are you using the standard LDraw layout? Or the alternative single directory BRIGL layout?

@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

I probed a little bit and it looks you are using the standard LDraw layout? In that case you need the "dontUseSubfolders" option to be "true".

var builder = new BRIGL.Builder(["ldraw/p/", "ldraw/parts/", "models/"], {dontUseSubfolders : true});

Apologies for this. I realize now that this variable is horribly named given it's current purpose, which is to specify BRIGL versus LDraw directory layout. A better name would be something like "use_ldraw_folders".

@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

I think what is happening with regard to the web-site going dark is that the server has a limit on how many 404's it will tolerate from the client before it decides to temporarily cut the client off. Or it may just be limiting the total number of queries in fixed time period? Anyway when you try and load a large model there is a reasonable chance of hitting this limit given the way BRIGL works. This is going to be even more likely if you use the standard ldraw directory layout as this will mean even more queries.

@mjhorvath

This comment has been minimized.

Copy link
Author

commented Aug 20, 2018

I fixed the "dontUseSubfolders" parameter, so the first model at least should load and render properly now.

But why all the 404s? The model looks identical in the browser window as it does in LDView. There is only 1 legitimate missing part: "axis_32s.dat".

@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

The 404's come from having to guess which directory the part is in. For example for "2555.dat" you will see that it tries "ldraw/p/2555.dat" before it finds the part in "ldraw/parts/2555.dat". If you use the single directory BRIGL layout you won't get any 404's, but then of course you have to organize the parts and sub-parts in a different way from the LDraw standard.

@mjhorvath

This comment has been minimized.

Copy link
Author

commented Aug 20, 2018

How do I switch over to the single folder layout? I don't have console access to the web server. Just FTP access.

@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 20, 2018

If you have Python then you could follow the steps here:

advanced installation

To create a local version of the single folder and then upload the folder with FTP.

@mjhorvath

This comment has been minimized.

Copy link
Author

commented Aug 21, 2018

On Windows 7 I am having difficulty with running the Python script.

D:\Downloads>cd "D:\Downloads\brigl-master\brigl-master"

D:\Downloads\brigl-master\brigl-master>python "D:\Downloads\brigl-master\brigl-m
aster\tools\prepareParts.py" "D:\Downloads\complete\ldraw\parts" .\parts
Traceback (most recent call last):
  File "D:\Downloads\brigl-master\brigl-master\tools\prepareParts.py", line 22,
in <module>
    os.mkdir(out_dir)
WindowsError: [Error 3] The system cannot find the path specified: '.\\parts\\0'


D:\Downloads\brigl-master\brigl-master>python "D:\Downloads\brigl-master\brigl-m
aster\tools\prepareParts.py" "D:\Downloads\complete\ldraw\p" .\parts
Traceback (most recent call last):
  File "D:\Downloads\brigl-master\brigl-master\tools\prepareParts.py", line 22,
in <module>
    os.mkdir(out_dir)
WindowsError: [Error 3] The system cannot find the path specified: '.\\parts\\1'


D:\Downloads\brigl-master\brigl-master>pause
Press any key to continue . . .

Do you know how to fix this? Thanks.

@mjhorvath

This comment has been minimized.

Copy link
Author

commented Aug 21, 2018

Okay, the problem was that I did not first create the "parts" directory inside the"brigl" directory before running the script. You might want to update the instructions or Python script to cover this.

@mjhorvath mjhorvath closed this Aug 21, 2018
@HazenBabcock

This comment has been minimized.

Copy link
Owner

commented Aug 22, 2018

Updated, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.