| 
									
										
										
										
											2019-05-03 10:40:02 -07:00
										 |  |  | # |source| this file | 
					
						
							| 
									
										
										
										
											2018-12-15 08:42:56 -08:00
										 |  |  | # | 
					
						
							|  |  |  | # Adjust the maximum number of files that may be opened to as large as possible. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | maxOpenFds=65000 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ $(ulimit -n) -lt $maxOpenFds ]]; then | 
					
						
							| 
									
										
										
										
											2019-10-08 22:34:26 -07:00
										 |  |  |   ulimit -n $maxOpenFds 2>/dev/null || { | 
					
						
							| 
									
										
										
										
											2018-12-18 13:46:37 -08:00
										 |  |  |     echo "Error: nofiles too small: $(ulimit -n). Failed to run \"ulimit -n $maxOpenFds\""; | 
					
						
							| 
									
										
										
										
											2019-02-02 10:44:11 -08:00
										 |  |  |     if [[ $(uname) = Darwin ]]; then | 
					
						
							|  |  |  |       echo "Try running |sudo launchctl limit maxfiles 65536 200000| first" | 
					
						
							|  |  |  |     fi | 
					
						
							| 
									
										
										
										
											2018-12-15 08:42:56 -08:00
										 |  |  |   } | 
					
						
							|  |  |  | fi |