Jump to content

SpaceDock.info (Mod Hosting Site)


VITAS

Recommended Posts

@RealGecko So its a new mod? FlightPlan has 1.0? When did the error happen ( after uploading?)?

 

i have:

17K Nov 12 00:52 FlightPlan-1.0.0.zip
328K Nov 12 00:53 FlightPlan-1478908406.4358277.png
5.2K Nov 12 01:22 thumb_FlightPlan-1478908406.4358277.png

Ill check the db when i get home, but the file creaton dates are quite old (i dont know if the server uses your creaton date or does its own timestamp).

 

If someone else created a mod in the last 3 days or so please tell me if you got the same error or not.

Edited by VITAS
Link to comment
Share on other sites

ok so my guess is ive to see what the db says. (i assume the filesize is correct).

Btw found an unrelated bug: i get 401 unauthorized when i try to publish your mod as admin :)

 

Update:

i created my own test mod and it went without a problem.

Have you tried deleting and recreating your mods?

also please creat some differently named test mod and try to publish it.

 

If someone else created a mod in the last 3 days or so please tell me if you got the same error or not.

Edited by VITAS
Link to comment
Share on other sites

5 hours ago, VITAS said:

ok so my guess is ive to see what the db says. (i assume the filesize is correct).

Btw found an unrelated bug: i get 401 unauthorized when i try to publish your mod as admin :)

 

Update:

i created my own test mod and it went without a problem.

Have you tried deleting and recreating your mods?

also please creat some differently named test mod and try to publish it.

 

If someone else created a mod in the last 3 days or so please tell me if you got the same error or not.

 

I'm still getting it, even since yesterday. I'll try what you recommended to Gecko.

I have reuploaded it, getting the same issue still. :(

Link to comment
Share on other sites

OK, as soon as "Add mod to CKAN" is checked you cannot publish or edit already published mod. Every time I push "Publish mod" or "Save changes" I get Internal Server Error. If "CKAN" is unchecked then everything goes smooth.

Problem is that there's no "CKAN" checkbox for saved, but not yet published mod.

Link to comment
Share on other sites

7 minutes ago, RealGecko said:

OK, as soon as "Add mod to CKAN" is checked you cannot publish or edit already published mod. Every time I push "Publish mod" or "Save changes" I get Internal Server Error. If "CKAN" is unchecked then everything goes smooth.

Problem is that there's no "CKAN" checkbox for saved, but not yet published mod.

 

Oh wow, you'e right. Just unchecked it and my mod went up perfectly. :S

Link to comment
Share on other sites

Found the problem (i think). will fix it as soon as possible. Ive to check some things first so i dont make it worse :)

 

Complicated explanation:

THe setup now is: Server with apache/db -> multiple servers with multiple gunicorn (app) instances

i missed to sync the netkan folder between machines so if you switch servers while publishing a mod it doesnt find the netkan file it generates for ckan and errors out.

Ive to sync all folders between each other before i can redirect them to one most up to date central share.

 

Edited by VITAS
Link to comment
Share on other sites

4 minutes ago, RealGecko said:

Just curious: why Apache? Nginx holds high load better :)

Because we support the preservation of american minorities

Jokes aside, VITAS knows it, and he runs the server, so why force him to use something he doesnt know.

(Not that I wouldn't fully support nginx for spacedock...)

Link to comment
Share on other sites

2 minutes ago, Thomas P. said:

VITAS knows it, and he runs the server

Nice, it's good to have business with professionals :)

2 minutes ago, VITAS said:

"i dont visit apache served websites" ?

I worked with Apache and it showed itself memory hungry at high load. Switched my server to Nginx years ago :D

Link to comment
Share on other sites

there are two versions: the current production version (based on kerbalstuff code and its a mess)

and the new version (two parts backend in python by thomas and frontend in slim3&jquery by me) thats still WiP

 

Im currently rsyncing the folders. So hopefully we will be ready to go for your mod in a couple of minutes

 

have to restart the site :/

 

Site is up again and bug fixed. ( i took the liberty to publish your flightplan mod)

 

also if you want to have some insigt in how i do things:

because gunicorn wont propperly use all the cores (and now its even distribute among several servers) i used apaches loadbalancing function with sticky routes and session cookies (gunicorn nromaly should stick with one server per usersession)

then i use reverse proxy to direct the app traffic to each server via openvpn (the mains erver and the app servers are in different locations)

i also use xfiles and other tricks to serve static content without gunicorns help directly from apache.

i also tried putting apache traffic server in front of it but it slowed down the site to much so im still runnign without caching server in front but i want to change that.

To figure all of this out took me a year. Now the cpu of the main server is down to 30% with about 250 ppl on the site. But loadingtimes arent not where i want them to be.

So the plan was to split front and backend to have the frontend (php,js,html...) run on cheap webspaces close to the users and do geoDNS (as weve done in the past with the modfiles). the backend will run in an similar setup as the site is now. Requests between the frontend and the backend will be done directly via ajax to the backend (the frotnends php framework serves only as routing and template engine)

Side effect: ppl could donate a gig or two of php webspace and we could have a mirror there. (sadly there are next to none python/flask hosters)

 

p.s.I proudly present to you a post youll never find on a minecraft forum :P

 

Edited by VITAS
Link to comment
Share on other sites

Oh, sorry, guys. @allista released an update for Hangar mod, I was in nirvana for a moment.... for a very long moment....

HOnGvUq.png

:D:D:D:D

1 hour ago, VITAS said:

Site is up again and bug fixed.

Thanks, works like a charm :)

App architecture is really tricky as far as I can see, but there are always ways for optimization. I'll write you PM, maybe we can discuss ways of making things better :)

Link to comment
Share on other sites

The on whole Apache vs. NGINX argument, it completely depends on the server load and server capability. 

Apache uses older, proven thread-based theory, and is designed to be used with a secondary caching content delivery proxy.  This works well for reliable medium-load servers.   However, this method tends to have a memory/bandwidth tradeoff.  This means to achieve more bandwidth, you need more and more memory.  This is not a problem until you are needing to serve while over 10K clients at once with dynamic assets.  Since most of the assets on SpaceDock are static and thus cache friendly, this shouldn't be an issue.  Under normal expected loads, Apache is more reliable and faster in many cases.  (This is why so many sites use it, or variants of it.)

NGINX works on an instance based system.  While this can handle heavier loads and more scalability, and is friendlier for high-end cloud-based and distributed servers, and interfaces better with modern CDN networks.  It's initial resource footprint is a little higher, but it's footprint increases a lot more slowly with additional transactions, because transaction data is kept a lot shorter, and most instances rely on shared memory for most of their data.  It is also a little more complicated to set up.  It's certainly a better option for many uses.  Spacedock might be able to benefit, maybe not.  It really depends on how the code is written, and what load it's under for what types of resources.

As a note, I strongly oppose running Apache without a caching proxy.   A caching proxy is usually a special "static data only" lightweight server.  It tends to have a much lower footprint than either NGINX or Apache, however it is very limited, being restricted to static assets, and sometimes basic non-database PHP processing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...