# Sorry page based on number of users

**URL:** <https://community.a10networks.com/t/sorry-page-based-on-number-of-users/190>\
**Category:** aFleX\
**Created:** [January 16, 2013, 1:35pm UTC](https://community.a10networks.com/t/sorry-page-based-on-number-of-users/190 "2013-01-16T13:35:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mischa](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mischa](https://community.a10networks.com/u/mischa)\
**Post date:** [January 16, 2013, 1:35pm UTC](https://community.a10networks.com/t/sorry-page-based-on-number-of-users/190/1 "2013-01-16T13:35:23Z")

</div>

In 2.7.0-P1 a new command has been introduced to aFleX `persist size uie [global]` If global is specified, the number of persistent entries in the entire partition is returned. This means you can for example generate a sorry page based on the max number of active users you want to allow. For example: `when HTTP_REQUEST { set THRESHOLD "no" set client_ip [IP::client_addr] set persist_entry [persist lookup uie $client_ip] set active_users [persist size uie global] log "persist size = [persist size uie global]" if { $active_users > 1 } { set THRESHOLD "yes" if { $persist_entry eq "" } { HTTP::respond 503 content "Not Available body { font-family: arial; color: black; background: white; } a { color: black; }The site is currently unavailable there are $active_users active users." } elseif { $persist_entry ne "" } { persist uie { $client_ip } 600 } } } when HTTP_RESPONSE { if { $THRESHOLD eq "no" } { persist add uie { $client_ip } 600 } }`

---

<div class="post-metadata">

**Author:** ![mischa](https://avatars.discourse-cdn.com/v4/letter/m/b9bd4f/32.png) [@mischa](https://community.a10networks.com/u/mischa)\
**Post date:** [October 9, 2013, 3:06pm UTC](https://community.a10networks.com/t/sorry-page-based-on-number-of-users/190/2 "2013-10-09T15:06:40Z")

</div>

File attached.
