Promouvoir serveur

Point three more plugin links at plugins that exist

Browse Source
csb-map-config and csb-vip-core never existed: csb-multimod-manager (per-prefix cfg), csb-vip-menu (VIP perks) and csb-match-stats-export (threaded SQLx) are the real ones, with the sentences matched to what they do.
C counter-strike-boost.com committed parent f8bbfd4a63 commit 2fc6d26fd38d28157d3f849e72660c350c5f6613
3 changed files with 3 additions and 3 deletions
+1 -1 fix-server-freeze-mysql-query/en.md M
@@ -14,4 +14,4 @@ public query_handler(failstate, Handle:query, error[], errcode, data[], size, Fl
14 14 return
15 15 }
16 16 // read rows from query here, no server freeze
17 -}</pre><p>The engine keeps simulating while MySQL works, and your handler runs when the answer arrives. If you wrote the plugin, replace every <code>SQL_Execute</code> in a gameplay path with <code>SQL_ThreadQuery</code>. If it is a third-party plugin, this is why it freezes and why you should replace it with one that uses threaded queries &mdash; a maintained plugin such as the <a href="/plugins/csb-vip-core">CSB VIP Core</a> does its database work off the main thread.</p><h2>4. Reduce the query cost too</h2><p>Threading hides the latency but does not excuse a bad schema. Make the queries cheap so even the background thread returns fast and connections do not pile up:</p><ul><li>Index the columns you filter on &mdash; a <code>SELECT ... WHERE steamid = ?</code> against an unindexed column scans the whole table.</li><li>Cache per-player data in memory on connect and write back on disconnect, rather than querying every action.</li><li>Keep the database close &mdash; a MySQL host across the internet turns every query into a slow round-trip. Run it on the same box or LAN.</li></ul><h2>5. Find which plugin is doing it</h2><p>If you do not know which plugin freezes the server, correlate the hitch with events. The freeze on <em>player connect</em> points at a plugin loading data on connect; on a <em>chat command</em> points at that command's handler. Pause suspects one at a time and watch whether the freeze disappears:</p><pre>amxx pause suspect.amxx</pre><p>When the freeze stops after pausing a specific plugin, that plugin's blocking query is the cause. The same pausing technique isolates FPS-draining plugins in <a href="/tutorials/fix-server-fps-drops-with-players">the server FPS guide</a>.</p><h2>Troubleshooting</h2><ul><li><strong>Freeze exactly when a player connects</strong> &mdash; a plugin runs a blocking query on connect. Convert it to <code>SQL_ThreadQuery</code>.</li><li><strong>Freeze on a specific chat command</strong> &mdash; that command's handler blocks on SQL. Thread it or cache the data.</li><li><strong>Freezes got worse over time</strong> &mdash; the table grew and unindexed queries got slower. Add indexes.</li><li><strong>Freezes only when the DB is remote</strong> &mdash; network latency per query. Move MySQL local or cache aggressively.</li><li><strong><code>SQL error</code> in logs plus a hang</strong> &mdash; the plugin is retrying a failing blocking query, stalling each time. Fix the connection and thread the query.</li><li><strong>Intermittent long freezes under load</strong> &mdash; blocking queries queuing behind each other on the main thread. Threaded queries remove the serialization.</li></ul><h2>Verification</h2><p>After moving the plugin to threaded queries, reproduce the trigger &mdash; have players connect rapidly, or spam the command &mdash; while watching <code>stats</code> in the console. The server FPS should stay steady with no hitch, because the main thread never waits on MySQL. Confirm the data still loads correctly (VIP flags apply, stats save) proving the threaded handler runs. If the freeze is gone and the data is right, the conversion worked. If a residual freeze remains, another plugin still uses blocking queries &mdash; pause them one at a time until the last hitch disappears.</p>
17 +}</pre><p>The engine keeps simulating while MySQL works, and your handler runs when the answer arrives. If you wrote the plugin, replace every <code>SQL_Execute</code> in a gameplay path with <code>SQL_ThreadQuery</code>. If it is a third-party plugin, this is why it freezes and why you should replace it with one that uses threaded queries &mdash; a maintained plugin such as <a href="/plugins/csb-match-stats-export">CSB Match Stats Export</a> does its database work off the main thread with threaded SQLx queries.</p><h2>4. Reduce the query cost too</h2><p>Threading hides the latency but does not excuse a bad schema. Make the queries cheap so even the background thread returns fast and connections do not pile up:</p><ul><li>Index the columns you filter on &mdash; a <code>SELECT ... WHERE steamid = ?</code> against an unindexed column scans the whole table.</li><li>Cache per-player data in memory on connect and write back on disconnect, rather than querying every action.</li><li>Keep the database close &mdash; a MySQL host across the internet turns every query into a slow round-trip. Run it on the same box or LAN.</li></ul><h2>5. Find which plugin is doing it</h2><p>If you do not know which plugin freezes the server, correlate the hitch with events. The freeze on <em>player connect</em> points at a plugin loading data on connect; on a <em>chat command</em> points at that command's handler. Pause suspects one at a time and watch whether the freeze disappears:</p><pre>amxx pause suspect.amxx</pre><p>When the freeze stops after pausing a specific plugin, that plugin's blocking query is the cause. The same pausing technique isolates FPS-draining plugins in <a href="/tutorials/fix-server-fps-drops-with-players">the server FPS guide</a>.</p><h2>Troubleshooting</h2><ul><li><strong>Freeze exactly when a player connects</strong> &mdash; a plugin runs a blocking query on connect. Convert it to <code>SQL_ThreadQuery</code>.</li><li><strong>Freeze on a specific chat command</strong> &mdash; that command's handler blocks on SQL. Thread it or cache the data.</li><li><strong>Freezes got worse over time</strong> &mdash; the table grew and unindexed queries got slower. Add indexes.</li><li><strong>Freezes only when the DB is remote</strong> &mdash; network latency per query. Move MySQL local or cache aggressively.</li><li><strong><code>SQL error</code> in logs plus a hang</strong> &mdash; the plugin is retrying a failing blocking query, stalling each time. Fix the connection and thread the query.</li><li><strong>Intermittent long freezes under load</strong> &mdash; blocking queries queuing behind each other on the main thread. Threaded queries remove the serialization.</li></ul><h2>Verification</h2><p>After moving the plugin to threaded queries, reproduce the trigger &mdash; have players connect rapidly, or spam the command &mdash; while watching <code>stats</code> in the console. The server FPS should stay steady with no hitch, because the main thread never waits on MySQL. Confirm the data still loads correctly (VIP flags apply, stats save) proving the threaded handler runs. If the freeze is gone and the data is right, the conversion worked. If a residual freeze remains, another plugin still uses blocking queries &mdash; pause them one at a time until the last hitch disappears.</p>
+1 -1 per-map-config-files/en.md M
@@ -37,7 +37,7 @@ public plugin_init()
37 37 if (file_exists(full))
38 38 server_cmd("exec %s", path)
39 39 }</pre>
40 -<p>Compile it, drop the <code>.amxx</code> in <code>addons/amxmodx/plugins/</code>, and add it to <a href="/tutorials/plugins-ini-load-order">plugins.ini</a>. The <code>exec</code> path is relative to the <code>cstrike/</code> game directory, so the files live in <code>cstrike/maps/de_dust2.cfg</code> and so on. If you would rather not compile your own, a maintained equivalent ships as a <a href="/plugins/csb-map-config">CSB Map Config</a> plugin.</p>
40 +<p>Compile it, drop the <code>.amxx</code> in <code>addons/amxmodx/plugins/</code>, and add it to <a href="/tutorials/plugins-ini-load-order">plugins.ini</a>. The <code>exec</code> path is relative to the <code>cstrike/</code> game directory, so the files live in <code>cstrike/maps/de_dust2.cfg</code> and so on. If you would rather not compile your own, a maintained alternative is the <a href="/plugins/csb-multimod-manager">CSB MultiMod Manager</a> plugin, which runs the right .cfg per map prefix (de_, surf_ and so on) from a mapping file.</p>
41 41
42 42 <h2>4. What belongs in a per-map config</h2>
43 43 <p>Keep these files small and specific — only the things that genuinely differ per map:</p>
+1 -1 reserved-slots-setup/en.md M
@@ -39,7 +39,7 @@ amx_hideslots 1 // 1 = hide reserved slots (server shows full)</pre>
39 39 "STEAM_0:1:2002" "" "abcdefiju" "ce"</pre>
40 40 <p>Account flag <code>c</code> marks the entry as a SteamID and <code>e</code> as name-only auth — the same format used throughout the <a href="/tutorials/prevent-admin-abuse">admin flags guide</a>. Give VIPs only <code>b</code>; there is no reason a paying player needs kick or ban rights. After editing, reload:</p>
41 41 <pre>amx_reloadadmins</pre>
42 -<p>For a full VIP feature set (skins, extra money, a shop) beyond just a slot, layer a <a href="/plugins/csb-vip-core">CSB VIP Core</a> plugin on top; reserved slots are just the entry ticket.</p>
42 +<p>For VIP perks beyond just a slot (extra HP, armor, grenades each round), layer a plugin such as <a href="/plugins/csb-vip-menu">CSB VIP Menu</a> on top; reserved slots are just the entry ticket.</p>
43 43
44 44 <h2>Troubleshooting</h2>
45 45 <ul>
46 46