XX-net/XX-Net · warning

all appid out of quota, wait %d seconds to reset

Error message

all appid out of quota, wait %d seconds to reset

What it means

All configured GAE appids are out of quota and the 600-second reset window hasn't elapsed. get() blocks (1s poll) until either an appid recovers or the window expires, then returns None. The 'wait %d seconds' message states remaining wait time.

Source

Thrown at code/default/gae_proxy/local/appid_manager.py:46

    def reset_appid(self):
        # called by web_control
        with self.lock:
            self.working_appid_list = list()
            for appid in self.config.GAE_APPIDS:
                if not appid:
                    self.config.GAE_APPIDS.remove(appid)
                    continue
                self.working_appid_list.append(appid)
            self.not_exist_appids = []
            self.out_of_quota_appids = []
        self.last_reset_time = time.time()

    def get(self):
        if len(self.config.GAE_APPIDS):
            if len(self.working_appid_list) == 0:
                time_to_reset = 600 - (time.time() - self.last_reset_time)
                if time_to_reset > 0:
                    self.logger.warn("all appid out of quota, wait %d seconds to reset", time_to_reset)
                    sleep_end = time.time() + time_to_reset
                    while len(self.working_appid_list) == 0 and time.time() < sleep_end:
                        time.sleep(1)
                    return None
                else:
                    self.logger.warn("reset appid")
                    self.reset_appid()

            appid = random.choice(self.working_appid_list)
            return str(appid)
        else:
            for _ in range(0, 10):
                appid = self.public_appid.get()
                if appid in self.out_of_quota_appids or appid in self.not_exist_appids:
                    continue
                else:
                    return appid
            return None

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Add more GAE appids to config (GAE_APPIDS)
  2. Wait for the ~10-minute quota reset window to pass
  3. Deploy appids across multiple Google accounts/projects to spread quota
  4. Upgrade to a paid GCP project with higher quota
Defensive patterns

Strategy: fallback

Validate before calling

if appid_manager.get() is None:
    switch_to_alternate_front()  # e.g. x-tunnel

Prevention

When it happens

Trigger: Every appid in working_appid_list has been reported out of quota; get() called again within 10 minutes of last_reset_time.

Common situations: Free GAE appids exhausted their daily quota, too few appids configured for the traffic volume, or heavy usage period.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/54b8984c2f2789aa. Report an issue: GitHub.