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.

Woo hoo!

9 years ago
Permalink

Comment has been collapsed.

Woo hoo indeed!

9 years ago
Permalink

Comment has been collapsed.

Great!

9 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 5 years ago.

9 years ago
Permalink

Comment has been collapsed.

Seem to work on my side, keep up the good work!

9 years ago
Permalink

Comment has been collapsed.

Good plan, makes sense.

9 years ago
Permalink

Comment has been collapsed.

Good news. Keep up the good work. :)

9 years ago
Permalink

Comment has been collapsed.

does that mean...It's easier to predict if event / train was created in last 15 minutes >:D?

9 years ago
Permalink

Comment has been collapsed.

sounds good to me =) Thanks for your good work!

9 years ago
Permalink

Comment has been collapsed.

Great job, thank you!

9 years ago
Permalink

Comment has been collapsed.

can't you make something like temporarely dissable accounts of users that haven't visited the site in x months ? probably would save something

9 years ago
Permalink

Comment has been collapsed.

& store them where? another database? this will increase load when scanning which users are old & the transfer of information/status, the only way is to actually delete the accounts

9 years ago
Permalink

Comment has been collapsed.

I'm guessing that the system already leaves out those with 300P in their accounts which is the amount non-active members would have.

9 years ago
Permalink

Comment has been collapsed.

cg listened to my suggestion, I'm glad!

9 years ago
Permalink

Comment has been collapsed.

That makes a good deal of sense. Thanks for the update :)

9 years ago
Permalink

Comment has been collapsed.

Bravo!

9 years ago
Permalink

Comment has been collapsed.

A sensible change, thanks.

9 years ago
Permalink

Comment has been collapsed.

Nice work, thanks.

9 years ago
Permalink

Comment has been collapsed.

Thank you for the good work. It's encouraging to see the site being improved.

9 years ago
Permalink

Comment has been collapsed.

Sounds good. Thanks for working hard on the site. :)

9 years ago
Permalink

Comment has been collapsed.

Lots of neat updates lately. Thanks for your work, cg!

9 years ago
Permalink

Comment has been collapsed.

Thanks again cg. Awesome improvements

9 years ago
Permalink

Comment has been collapsed.

Nice, thanks for the continued support! :-)

9 years ago
Permalink

Comment has been collapsed.

Thank you! Yes, it works smoothly now and I understand why I get a bunch of points at once, instead of 1-2 when I refresh, hehe.

9 years ago
Permalink

Comment has been collapsed.

But now you can't spam refresh hoping for that last point you need to enter a giveaway ending in 3 minutes.

9 years ago
Permalink

Comment has been collapsed.

I know that feeling... That's why I just said I understand, not that I'm happy about it ;)

9 years ago
Permalink

Comment has been collapsed.

Thanks, cg! This is a great update!

9 years ago
Permalink

Comment has been collapsed.

Deleted

This comment was deleted 5 years ago.

9 years ago
Permalink

Comment has been collapsed.

Great improvement. Thanks a lot!

9 years ago
Permalink

Comment has been collapsed.

That's a good change! Thanks!

9 years ago
Permalink

Comment has been collapsed.

Sign in through Steam to add a comment.