Network Troubleshooting
- Network Troubleshooting
This article provides a comprehensive guide to troubleshooting network issues affecting your MediaWiki installation. Proper network configuration is crucial for optimal performance and accessibility of your wiki. This guide assumes a basic understanding of networking concepts like IP addresses, DNS, and firewalls. It also assumes you have shell access to the server running MediaWiki.
Understanding the Network Stack
Before diving into specific troubleshooting steps, it's important to understand the network stack. Data travels through layers from the application (MediaWiki) down to the physical network interface. Problems can occur at any layer. We’ll focus on the layers most commonly affecting MediaWiki, namely the application, transport, network, and physical layers.
- **Application Layer:** This is where MediaWiki resides. Issues here typically involve configuration errors within MediaWiki itself, or problems with external services it relies on (like databases).
- **Transport Layer:** Primarily TCP and UDP. MediaWiki relies heavily on TCP for web traffic (port 80/443). Problems here can manifest as connection timeouts or slow page loads.
- **Network Layer:** IP addresses, routing. Incorrect IP configuration or routing issues can prevent access to the wiki.
- **Physical Layer:** Network cables, switches, network interface cards (NICs). Physical connectivity problems are often the root cause of network issues.
Common Network Symptoms
Here's a breakdown of common network-related symptoms and potential causes:
- **Wiki Unreachable:** Users cannot access the wiki at all. This could be due to server downtime, network connectivity issues, firewall restrictions, or DNS problems.
- **Slow Page Loads:** Pages take a long time to load. This might be caused by high server load, network congestion, slow database queries, or inefficient MediaWiki configuration.
- **Connection Timeouts:** Users experience frequent connection timeouts. This often indicates a problem with network connectivity, firewall rules, or server responsiveness.
- **Intermittent Connectivity:** The wiki is sometimes accessible and sometimes not. This can be a sign of flaky network hardware or intermittent DNS issues.
- **Database Connection Errors:** MediaWiki cannot connect to the database server. This could be due to network connectivity issues between the web server and the database server, or incorrect database configuration. See Manual:Configuration settings for database details.
Basic Troubleshooting Tools
Several command-line tools are invaluable for network troubleshooting.
Tool | Description | Example |
---|---|---|
`ping` | Tests basic network connectivity to a host. | `ping google.com` |
`traceroute` (or `tracert` on Windows) | Traces the route packets take to reach a destination. | `traceroute google.com` |
`netstat` | Displays network connections, routing tables, and interface statistics. | `netstat -an` |
`nslookup` (or `dig`) | Queries DNS servers to resolve domain names to IP addresses. | `nslookup mediawiki.org` |
`tcpdump` (or `wireshark`) | Captures network traffic for detailed analysis. Requires root privileges. | `tcpdump -i eth0 port 80` |
Specific Troubleshooting Scenarios
Scenario 1: Wiki Unreachable
1. **Verify Server Uptime:** Ensure the server hosting MediaWiki is running. Use `uptime` or `top` to check. See Help:System requirements for minimum server specs. 2. **Check Local Network Connectivity:** Ping the server’s IP address from the server itself: `ping 127.0.0.1` and `ping <server's public/private IP>`. 3. **Ping from External Network:** Ping the server’s public IP address from a different network to rule out local network issues. 4. **Check Firewall Rules:** Ensure the firewall (e.g., `iptables`, `firewalld`) allows incoming traffic on ports 80 (HTTP) and 443 (HTTPS). See Manual:Configuration settings#Firewall for configuration details. 5. **Verify DNS Resolution:** Use `nslookup` or `dig` to confirm that the wiki’s domain name resolves to the correct IP address. Check your Manual:Short URL settings. 6. **Check Web Server Configuration:** Verify that your web server (e.g., Apache, Nginx) is correctly configured to serve the MediaWiki installation. See Manual:Apache configuration and Manual:Nginx configuration.
Scenario 2: Slow Page Loads
1. **Server Load:** Check server CPU usage, memory usage, and disk I/O using `top`, `free -m`, and `iostat`. Consider Scalability options if resources are strained. 2. **Network Latency:** Use `ping` and `traceroute` to identify potential network latency issues. 3. **Database Performance:** Slow database queries are a common cause of slow page loads. Examine the `recentchanges` table for large entries. Optimize database queries and indexes. See Manual:Database for database options. 4. **MediaWiki Caching:** Ensure MediaWiki caching is enabled and configured correctly. Check `$wgCacheDirectory` in `LocalSettings.php`. 5. **Web Server Caching:** Configure web server caching (e.g., Apache's `mod_cache`, Nginx's caching directives) to reduce server load.
Scenario 3: Database Connection Errors
1. **Network Connectivity:** Ping the database server from the MediaWiki server: `ping <database server IP>`. 2. **Firewall Rules:** Ensure the firewall allows traffic between the MediaWiki server and the database server on the database port (typically 3306 for MySQL/MariaDB, 5432 for PostgreSQL). 3. **Database Server Uptime:** Verify the database server is running. 4. **Database Credentials:** Double-check the database credentials (username, password, database name, host) in `LocalSettings.php`. See Manual:Configuration settings#Database 5. **Database User Permissions:** Ensure the database user has the necessary permissions to access the MediaWiki database.
Advanced Troubleshooting
For more complex network issues, consider using packet capture tools like `tcpdump` or Wireshark to analyze network traffic. This can help identify dropped packets, retransmissions, and other network anomalies. Also, review the server logs (web server logs, database server logs, MediaWiki logs) for error messages. See Manual:Logging for details on MediaWiki logging.
Server Specifications Table
Component | Minimum Specification | Recommended Specification |
---|---|---|
CPU | 2 Core | 4+ Core |
RAM | 2 GB | 8+ GB |
Disk Space | 20 GB | 100+ GB (SSD recommended) |
Network Bandwidth | 10 Mbps | 100+ Mbps |
Network Interface Table
Interface | IP Address | Netmask | Gateway |
---|---|---|---|
eth0 | 192.168.1.100 | 255.255.255.0 | 192.168.1.1 |
lo | 127.0.0.1 | 255.0.0.0 | N/A |
DNS Configuration Table
DNS Server | IP Address |
---|---|
Primary DNS | 8.8.8.8 |
Secondary DNS | 8.8.4.4 |
See also: Manual:Maintenance tasks, Manual:Upgrading, Help:FAQ
Intel-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Core i7-6700K/7700 Server | 64 GB DDR4, NVMe SSD 2 x 512 GB | CPU Benchmark: 8046 |
Core i7-8700 Server | 64 GB DDR4, NVMe SSD 2x1 TB | CPU Benchmark: 13124 |
Core i9-9900K Server | 128 GB DDR4, NVMe SSD 2 x 1 TB | CPU Benchmark: 49969 |
Core i9-13900 Server (64GB) | 64 GB RAM, 2x2 TB NVMe SSD | |
Core i9-13900 Server (128GB) | 128 GB RAM, 2x2 TB NVMe SSD | |
Core i5-13500 Server (64GB) | 64 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Server (128GB) | 128 GB RAM, 2x500 GB NVMe SSD | |
Core i5-13500 Workstation | 64 GB DDR5 RAM, 2 NVMe SSD, NVIDIA RTX 4000 |
AMD-Based Server Configurations
Configuration | Specifications | Benchmark |
---|---|---|
Ryzen 5 3600 Server | 64 GB RAM, 2x480 GB NVMe | CPU Benchmark: 17849 |
Ryzen 7 7700 Server | 64 GB DDR5 RAM, 2x1 TB NVMe | CPU Benchmark: 35224 |
Ryzen 9 5950X Server | 128 GB RAM, 2x4 TB NVMe | CPU Benchmark: 46045 |
Ryzen 9 7950X Server | 128 GB DDR5 ECC, 2x2 TB NVMe | CPU Benchmark: 63561 |
EPYC 7502P Server (128GB/1TB) | 128 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/2TB) | 128 GB RAM, 2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (128GB/4TB) | 128 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/1TB) | 256 GB RAM, 1 TB NVMe | CPU Benchmark: 48021 |
EPYC 7502P Server (256GB/4TB) | 256 GB RAM, 2x2 TB NVMe | CPU Benchmark: 48021 |
EPYC 9454P Server | 256 GB RAM, 2x2 TB NVMe |
Order Your Dedicated Server
Configure and order your ideal server configuration
Need Assistance?
- Telegram: @powervps Servers at a discounted price
⚠️ *Note: All benchmark scores are approximate and may vary based on configuration. Server availability subject to stock.* ⚠️