oceanbase 数据库无法连接怎么办?目前执行obd cluster restart 数据库的时候,卡在了Initialize cluster的时候,看日志是clog disk space is almost full满了,我当时只用了一台服务器部署,部署的时候只部署了一台observe和proxy,也可以通过修改log_disk_utilization_limit_threshold参数吗?目前数据库无法连接上
```## Only need to configure when remote login is required
user:
username: root
password: 123456
oceanbase-ce:
servers:
# Please don't use hostname, only IP can be supported
- 172.1.3.242
global:
# The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /backup/oceanbase/home
# The directory for data storage. The default value is $home_path/store.
data_dir: /backup/oceanbase/data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
redo_dir: /backup/oceanbase/redo
# Please set devname as the network adaptor's name whose ip is in the setting of severs.
# if set severs as "127.0.0.1", please set devname as "lo"
# if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
devname: ens18
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
zone: zone1
cluster_id: 1
# please set memory limit to a suitable value which is matching resource.
memory_limit: 6G # The maximum running memory for an observer
system_memory: 1G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
datafile_size: 8G # Size of the data file.
log_disk_size: 8G # The size of disk space used by the clog files.
cpu_count: 8
production_mode: false
syslog_level: INFO # System log level. The default value is INFO.
enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.
max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
# observer cluster name, consistent with obproxy's cluster_name
appname: obcluster
# root_password: # root user password, can be empty
# proxyro_password: # proxyro user pasword, consistent with obproxy's observer_sys_password, can be empty
obproxy-ce:
depends:
- oceanbase-ce
servers:
- 172.1.3.242
global:
listen_port: 2883 # External port. The default value is 2883.
prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
home_path: /backup/oceanbase/obproxy
# oceanbase root server list
# format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# rs_list: 192.168.1.2:2881
enable_cluster_checkout: false
# observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# cluster_name: obcluster
skip_proxy_sys_private_check: true
enable_strict_kernel_release: false
# obproxy_sys_password: # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
```
我的服务器性能有限,很多参数都调的比较小
根据您的描述,您的OceanBase数据库无法连接,并且日志显示clog磁盘空间已满。您可以尝试以下方法来解决这个问题:
清理不必要的数据:检查数据库中是否有可以删除或归档的旧数据,尤其是大型的CLOB(Character Large Object)数据。清理这些数据可以释放一些磁盘空间。
调整配置参数:您提到服务器性能有限,很多参数都调得比较小。您可以尝试调整log_disk_size
和datafile_size
参数的值,以便为clog文件分配更多的磁盘空间。例如,将log_disk_size
设置为更大的值,如16G或32G,以提供更多的磁盘空间给clog文件。
增加磁盘空间:如果调整配置参数后仍然无法解决问题,您可以考虑增加磁盘空间。这可以通过添加新的磁盘或扩展现有磁盘来实现。在增加磁盘空间后,您需要重新配置OceanBase数据库以使用新的磁盘空间。
重启集群:在完成上述操作后,尝试重新启动OceanBase数据库集群。您可以使用以下命令来重启集群:
obd cluster restart
监控磁盘空间:在解决问题后,建议您定期监控磁盘空间的使用情况,以确保磁盘空间不会再次耗尽。您可以使用系统工具或第三方监控工具来监控磁盘空间的使用情况。
1.建议默认log_disk_size是memory_limit内存大小的3倍。
2.可以扩一下配置文件对应的/backup目录的磁盘。3.data_dir: /backup/oceanbase/data
redo_dir: /backup/oceanbase/redo
建议还是分开部署较好。https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000510460。
4.若需要带参启动,则在 -o 后指定需要修改的参数即可。https://ask.oceanbase.com/t/topic/35602977
--此回答整理自钉群“[社区]技术答疑群OceanBase”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。