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

Doesn't work for League of Legends client update #7

Closed
pyro2927 opened this issue Feb 24, 2017 · 13 comments
Closed

Doesn't work for League of Legends client update #7

pyro2927 opened this issue Feb 24, 2017 · 13 comments
Labels

Comments

@pyro2927
Copy link

pyro2927 commented Feb 24, 2017

Requests come through when the updated League of Legends launches (verified by tailing the logs), but something causes it to fail to patch.

2017-02-23 at 9 56 pm

Not sure as of this point in time, but the new patcher may be forcing HTTPS and validating certificates.

@kixelated
Copy link

I've figured out and fixed why League does not work at all. I have my own fork that merges steamcache and generic: https://github.com/kixelated/steamcache

  1. League's CDN does not support the slice module. While downloading, you get random errors because the ETag mismatches between slices. This is pretty bad because nginx doesn't know if it's downloading the same file when the ETag randomly changes. My fix is to just disable slicing for League (this is what multiplay/lancache does).

  2. Everything may work for a few days, but eventually you stop being able to load into a game. It's because this config ignores the Expire/Cache-Control header. League polls a file containing the current patch version every 30 seconds. Normally this file has an expires header, but steamcache ignores it and caches the file for a year instead. The client will never learn there is a new patch and will be rejected by the game server.

I don't think it's possible to have a one-size-fits-all caching strategy. Slice is needed for Origin/Battle.net/Windows but not needed for Steam and will not work for League. Steam and Battle.net also need to ignore cache headers, meanwhile Riot and probably others should obey them. It's annoying but you need to treat these services separately.

@pyro2927
Copy link
Author

@kixelated Awesome! I've tried out your container, but it appears to be having a different issue:

2017/02/27 01:07:03 [crit] 12#12: *9 pwritev() "/data/tmp/0000000011" has written only 4096 of 8192 while reading upstream, client: 192.168.1.161, server: riot, request: "GET /re
leases/Maclive/projects/league_client/releases/0.0.0.52/packages/files/BIN_0x00000002 HTTP/1.1", upstream: "http://184.25.204.67:80/releases/Maclive/projects/league_client/releas
es/0.0.0.52/packages/files/BIN_0x00000002", host: "l3cdn.riotgames.com"
2017/02/27 01:07:13 [crit] 12#12: *22 pwritev() "/data/tmp/0000000012" has written only 4096 of 8192 while reading upstream, client: 192.168.1.161, server: riot, request: "GET /r
eleases/Maclive/projects/league_client/releases/0.0.0.52/packages/files/BIN_0x00000002 HTTP/1.1", upstream: "http://209.197.3.7:80/releases/Maclive/projects/league_client/release
s/0.0.0.52/packages/files/BIN_0x00000002", host: "l3cdn.riotgames.com"
192.168.1.161 - - [27/Feb/2017:01:07:13 +0000] riot "GET l3cdn.riotgames.com/releases/Maclive/projects/league_client/releases/0.0.0.52/packages/files/BIN_0x00000002" - 200 190983
357 "-"  MISS - 200 313808904
2017/02/27 01:07:24 [crit] 12#12: *25 pwritev() "/data/tmp/0000000013" has written only 4096 of 8192 while reading upstream, client: 192.168.1.161, server: riot, request: "GET /r
eleases/Maclive/projects/league_client/releases/0.0.0.52/packages/files/BIN_0x00000002 HTTP/1.1", upstream: "http://209.197.3.7:80/releases/Maclive/projects/league_client/release
s/0.0.0.52/packages/files/BIN_0x00000002", host: "l3cdn.riotgames.com"
192.168.1.161 - - [27/Feb/2017:01:07:24 +0000] riot "GET l3cdn.riotgames.com/releases/Maclive/projects/league_client/releases/0.0.0.52/packages/files/BIN_0x00000002" - 200 196938
981 "-"  MISS - 200 313808656

I'm running it using a 5TB external hard drive as the cache volume (not sure if that has something to do with it). Adding fastcgi_buffering off to nginx.conf seems to have resolved the issue!

@kixelated
Copy link

@pyro2927 Do you mean proxy_buffering off? We don't use fastcgi so I don't think that option will have an effect. Either way, it makes sense to turn buffering off because for our use case, clients will almost always be faster than the upstream.

@pyro2927
Copy link
Author

pyro2927 commented Mar 2, 2017

Maybe it's purely coincidence? I definitely used fastcgi_buffering off and not proxy_buffering, though as soon as I added that to the nginx config and build the container myself it started working.

@kixelated
Copy link

And for future reference, don't use proxy_buffer off because it actually disables caching completely (undocumented of course). 4Head

@astrolox
Copy link
Member

astrolox commented Mar 7, 2017

We came to a similar conclusion in thinking that a one-size-fits-all caching strategy isn't possible, although this generic container comes close.

Need to investigate League of Legends and the slice module. We haven't hit that issue with this container yet.

Offering the ability to run it without the slice option would be quite simple however, sounds like a good feature request to me.

@ekhoury2000
Copy link

Hi @kixelated @astrolox @pyro2927 ,

I have created my cache server using Q-Con/qcacher and it seems to work fine, except for Riot League of legends, it give the error shown in the picture above.

I have read the disabling slicing or setting fastcgi_buffering off would solve the issue, but could you please help me on where to make those modifications? is it in the riot.conf file where riot's DNS records are? or i am obliged to do it for the whole server in nginx.conf?

Thanks in advance,

Elie

@kixelated
Copy link

@ekhoury2000 If you're using qcache, you should probably ask those guys for help. The advice in this thread is specific to steamcache and my fork. For example, qcache doesn't appear to use slice so disabling it isn't an option.

@ekhoury2000
Copy link

@kixelated Thank you for your reply,

Since using steamcache and lancache on same server is impossible due to the ports limitation, i have created 2 servers, one for steamcache for steam games and one lancache for all other games like riot and blizzard.
i tested riot lol and it worked fine, but can i use your lancache to add more services? like twitch, youtube, .... maybe some other game clients?

Thanks a lot

@kixelated
Copy link

My fork combines steamcache and steamcache/generic so you don't have that issue. Twitch is actually impossible to cache now because we switched over to HTTPS and even then, the URLs are unique per user. You can blame me for that one, I actually implemented it (I work for twitch).

@ekhoury2000
Copy link

@kixelated Oh thank you, i will try your for alone and let you know :) thanks a lot appreciate the help

@mintopia mintopia added the bug label Apr 11, 2017
@mintopia
Copy link
Member

mintopia commented Nov 9, 2017

The Etag issue is probably fixed in 2017-updates branch, but based on the comments from @kixelated, this isn't enough.

Suggestions for fixing:

  1. Separate tag for slice disabled/not ignoring expiry (keeps it within this project)
  2. Fork to steamcache-league (Better fits with the ideology of this project)

My preference would be the second option, however the name of this project is unfortunate!

@mintopia
Copy link
Member

mintopia commented Dec 6, 2017

I've implemented a fix for League where we don't cache the .version and release listing files.

@mintopia mintopia closed this as completed Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants