The Issue

When you create a giveaway there's a delay for 5-10 seconds. Also, when entering giveaways, the site occasionally hangs on the please wait state, or takes a few seconds to go through.

Why Is This Happening?

After a giveaway is created, the site needs to distribute 5% of the value in points to all users. This takes a few seconds, since we have nearly a million users. Since it happens during the giveaway creation process, users wait this few seconds when creating their giveaway.

As for the enter giveaway button, it sometimes freezes due to deadlocks in the database, when it's trying to perform the needed queries to enter the giveaway. Also, if a user creates a giveaway, and you try to enter a giveaway at the same time, there's a delay. The site is trying to distribute points for all users, and you need points removed from your account for entering the giveaway. This creates a delay for a few seconds until points are distributed and your giveaway entry can go through. During peak hours, we might have 5-10 giveaways created every minute. There's a decent chance you click the button to enter a giveaway within a few seconds of someone creating a giveaway, and end up waiting.

Solution

Points are now distributed in 15 minute intervals. Every 15 minutes, the site will look at the recently created giveaways, and distribute 5% of their total value to everyone. This means creating giveaways is faster and you no longer have that delay. Also, you're almost 100x less likely to run into a few second delay when entering a giveaway. Lastly, the code was improved for transactions surrounding giveaway entries, so there should no longer be deadlocks and endless please wait messages. These changes rolled out a couple of hours ago, and since then you should have seen the button for entering giveaways performing better.

9 years ago*

Comment has been collapsed.

Thanks for the improvement and technical transparency.

9 years ago
Permalink

Comment has been collapsed.

Good night cg, rest a bit. You deserve it

9 years ago
Permalink

Comment has been collapsed.

Yes! Good job! :>

9 years ago
Permalink

Comment has been collapsed.

Nice, especially nice for those that do not enter much :)

9 years ago
Permalink

Comment has been collapsed.

It doesn't change anything. I still have 300P sitting there, 99% of the time.

9 years ago
Permalink

Comment has been collapsed.

I mean, I don't wanna struggle for one hour entering GA, since I do not even enter daily.

9 years ago
Permalink

Comment has been collapsed.

thanks for your hard work improving the site!

9 years ago
Permalink

Comment has been collapsed.

<3

9 years ago
Permalink

Comment has been collapsed.

Thanks for that ;)

9 years ago
Permalink

Comment has been collapsed.

After a giveaway is created, the site needs to distribute 5% of the value in points to all users. This takes a few seconds, since we have nearly a million users.

If it's implementable, exclude people who didn't logged for a month from points distribution could save some resource ?

9 years ago
Permalink

Comment has been collapsed.

That's already done... they're stuck at 300 points anyway, as far as I'm concerned.. Now it's a different question if cg's code is written such that these are excluded form the DB query...

9 years ago
Permalink

Comment has been collapsed.

well, we don't know how people at 300 points are handled
edit, nvm http://www.steamgifts.com/go/comment/dkla7sa

9 years ago
Permalink

Comment has been collapsed.

The change totally improved the website speed a lot, I'm not gonna miss what you had to modify. ;)

9 years ago
Permalink

Comment has been collapsed.

I'm pretty sure the speed improvements have more to do with this.

9 years ago
Permalink

Comment has been collapsed.

Awesome :D Thanks for everything admins :D

9 years ago
Permalink

Comment has been collapsed.

Thanks for the job CG

9 years ago
Permalink

Comment has been collapsed.

I know points are coming in bunches instead of a trickle now, but I seem to be getting more points than usual. Is that a misperception?

9 years ago
Permalink

Comment has been collapsed.

Well done!

9 years ago
Permalink

Comment has been collapsed.

sounds good

9 years ago
Permalink

Comment has been collapsed.

Interesting read. Thanks :)

9 years ago
Permalink

Comment has been collapsed.

Thanks allfather :)

9 years ago
Permalink

Comment has been collapsed.

Interesting change

9 years ago
Permalink

Comment has been collapsed.

Sweet! I already noticed this, but cheers! (=οΎŸΟ‰οΎŸ)οΎ‰

9 years ago
Permalink

Comment has been collapsed.

this is the best update ever lol

thank you

9 years ago
Permalink

Comment has been collapsed.

Good change.

9 years ago
Permalink

Comment has been collapsed.

and since then you should have seen the button for entering giveaways performing better.

Well, that explains why it's been so smooth, again. :)

9 years ago
Permalink

Comment has been collapsed.

Good work, thanks!

9 years ago
Permalink

Comment has been collapsed.

Great work cg :)

9 years ago
Permalink

Comment has been collapsed.

Good job, thanks!

9 years ago
Permalink

Comment has been collapsed.

Hm, does the site takes accounts with 300P into calculation when distributing the points? You mentioned almost a million user, while active users are considerably less, I've seen lots of profiles with no activity for the past months, years. Filtering out them from the point distribution (as they already have 300 points waiting for them if they'd return) could maybe help in ..some way?

9 years ago
Permalink

Comment has been collapsed.

Yep, that's all taken into account, and the database only updates users that are changing in points.

9 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.