# Pillar or Node Trouble Shooting Steps

**URL:** https://forum.hypercore.one/t/pillar-or-node-trouble-shooting-steps/251
**Category:** How To
**Created:** [December 1, 2023, 6:15pm UTC](https://forum.hypercore.one/t/pillar-or-node-trouble-shooting-steps/251 "2023-12-01T18:15:09Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [December 1, 2023, 6:15pm UTC](https://forum.hypercore.one/t/pillar-or-node-trouble-shooting-steps/251/1 "2023-12-01T18:15:09Z")

</div>

Pillars and Nodes have been struggling under the recent load increases. Here are some ideas to address the potential issues.

## Increase the max number of open files in Linux

To increase the maximum number of open files in Linux, you typically need to adjust the limits in the system configuration. Here’s a step-by-step guide:

1. **Check Current Limits** :  
First, check the current limits for your system. Open a terminal and use the following command:

2. **Temporary Increase** :  
To temporarily increase the limit for the current session, use:

3. **Permanent Increase** :  
For a permanent change, you need to edit system configuration files:

4. **Apply Changes** :

5. **Verify Changes** :  
After rebooting or restarting the service, verify that the changes have been applied by using the `ulimit -n` command again.

Remember, setting these limits too high can affect system stability, so it’s important to choose a value that balances your needs with the capabilities of your system.

## Increase the amount of swap memory

To set up a system for dynamically increasing swap space on Linux, you can use a tool like `dphys-swapfile`. This tool is commonly used in Debian-based systems, such as Ubuntu, to manage a dynamic swap file. Here are the general steps to set it up:

### Installing `dphys-swapfile`

1. **Update Your Package Lists** :  
Open a terminal and update your package lists to ensure you get the latest version of the software:

2. **Install `dphys-swapfile`** :  
Install the `dphys-swapfile` package:

### Configuring `dphys-swapfile`

1. **Edit the Configuration File** :  
Open the configuration file in a text editor. For example, using `nano`:

2. **Configure Swap Settings** :  
In the configuration file, you can set parameters like the size of the swap file. For instance:

3. **Save and Exit** :  
After making your changes, save and exit the editor. In `nano`, this is done by pressing `CTRL+X`, then `Y` to confirm, and `Enter` to save.

### Activating the Swap File

1. **Restart the `dphys-swapfile` Service** :  
Apply the changes by restarting the service:

2. **Verify Swap File Creation** :  
Check that the swap is active:

### Reduce the number of peers in config.json

`sudo nano /root/.znn/config.json`

```auto
{
    "Producer": {
        "Index": 0,
        "KeyFilePath": "producer",
        "Password": "REDUCE",
        "Address": "REDUCE"
    },
    "Net": {
        "MinPeers": 8,
        "MinConnectedPeers": 8,
        "MaxPeers": 16,
        "MaxPendingPeers": 32
    }
}

```

### Additional Notes

- **Automatic Management** : `dphys-swapfile` will automatically manage the swap file, creating it at boot time and removing it at shutdown.
- **Performance Considerations** : Keep in mind that using swap space can impact system performance, especially if the swap file is used heavily.
- **System Requirements** : Make sure your system has enough disk space for the swap file, especially if you’re setting a large fixed size.

This setup provides a basic dynamic swap configuration. For more advanced configurations, refer to the `dphys-swapfile` documentation and your Linux distribution’s specific guidelines.

---

<div class="post-metadata">

### Author: ![tapwoot](https://forum.hypercore.one/user_avatar/forum.hypercore.one/tapwoot/32/34_2.png) [@tapwoot](https://forum.hypercore.one/u/tapwoot)
#### Post date: [December 1, 2023, 6:39pm UTC](https://forum.hypercore.one/t/pillar-or-node-trouble-shooting-steps/251/2 "2023-12-01T18:39:52Z")

</div>

thankyou i needed this

---

<div class="post-metadata">

### Author: ![0x3639](https://forum.hypercore.one/user_avatar/forum.hypercore.one/0x3639/32/33_2.png) [@0x3639](https://forum.hypercore.one/u/0x3639)
#### Post date: [December 1, 2023, 6:55pm UTC](https://forum.hypercore.one/t/pillar-or-node-trouble-shooting-steps/251/3 "2023-12-01T18:55:29Z")

</div>

Please try on one node and let us know if it helps. You can also play around with the swap file size. If 8g is not enough, increase to some number less than your RAM. I might try 10G if I had 16G of RAM.
