private void warningInvalidMemoryLeftValue(String parameter, String memoryLeft) { OLogManager.instance() .warnNoDb(this, "Invalid value of '%s' parameter ('%s') memory limit will not be decreased", memoryLeft, parameter); } }
/** * Checks the OrientDB cache memory configuration and emits a warning if configuration is invalid. */ public static void checkCacheMemoryConfiguration() { final long maxHeapSize = Runtime.getRuntime().maxMemory(); final long maxCacheSize = getMaxCacheMemorySize(); final ONative.MemoryLimitResult physicalMemory = ONative.instance().getMemoryLimit(false); if (maxHeapSize != Long.MAX_VALUE && physicalMemory != null && maxHeapSize + maxCacheSize > physicalMemory.memoryLimit) OLogManager.instance().warnNoDb(OMemory.class, "The sum of the configured JVM maximum heap size (" + maxHeapSize + " bytes) " + "and the OrientDB maximum cache size (" + maxCacheSize + " bytes) is larger than the available physical memory size " + "(" + physicalMemory + " bytes). That may cause out of memory errors, please tune the configuration up. Use the " + "-Xmx JVM option to lower the JVM maximum heap memory size or storage.diskCache.bufferSize OrientDB option to " + "lower memory requirements of the cache."); }
/** * Deregisters JMX bean for current manager. * * @param storageName Name of storage of given manager * @param storageId Id of storage of given manager * * @see OStorage#getName() * @see OIdentifiableStorage#getId() */ public void unregisterMBean(String storageName, int storageId) { if (storageName == null) { OLogManager.instance().warnNoDb(this, "Can not unregister MBean for performance statistics, storage name is null"); } if (mbeanIsRegistered.compareAndSet(true, false)) { try { final MBeanServer server = ManagementFactory.getPlatformMBeanServer(); final ObjectName mbeanName = new ObjectName(getMBeanName(storageName, storageId)); server.unregisterMBean(mbeanName); } catch (MalformedObjectNameException | InstanceNotFoundException | MBeanRegistrationException e) { throw OException.wrapException(new OStorageException("Error during unregistration of profiler MBean"), e); } } }
private void closeFD() { if (allocationMode == AllocationMode.DESCRIPTOR && fd > 0) { try { ONative.instance().close(fd); } catch (final LastErrorException e) { OLogManager.instance() .warnNoDb(this, "Can not close Linux descriptor of file %s, error %d", osFile.toAbsolutePath().toString(), e.getErrorCode()); } allocationMode = null; fd = 0; } }
OLogManager.instance().warnNoDb(this, "Can not retrieve list of cgroups to which process belongs, " + "no restrictions applied by cgroups will be taken into account");
private void initAllocationMode() { if (allocationMode != null) { return; } if (Platform.isLinux()) { allocationMode = AllocationMode.DESCRIPTOR; int fd = 0; try { fd = ONative.instance().open(osFile.toAbsolutePath().toString(), ONative.O_CREAT | ONative.O_RDONLY | ONative.O_WRONLY); } catch (final LastErrorException e) { OLogManager.instance().warnNoDb(this, "File %s can not be opened using Linux native API," + " more slower methods of allocation will be used. Error code : %d.", osFile.toAbsolutePath().toString(), e.getErrorCode()); allocationMode = AllocationMode.WRITE; } this.fd = fd; } else if (Platform.isWindows()) { allocationMode = AllocationMode.LENGTH; } else { allocationMode = AllocationMode.WRITE; } }
} catch (final NumberFormatException e) { if (!OLogManager.instance().isDebugEnabled()) OLogManager.instance().warnNoDb(OMemory.class, "Unable to determine the amount of installed RAM."); else OLogManager.instance().debugNoDb(OMemory.class, "Unable to determine the amount of installed RAM.", e); OLogManager.instance().warnNoDb(OMemory.class, "Unable to determine the amount of installed RAM."); OLogManager.instance().warnNoDb(OMemory.class, "Unable to determine the amount of installed RAM."); else OLogManager.instance().debugNoDb(OMemory.class, "Unable to determine the amount of installed RAM.", e); } catch (final RuntimeException e) { OLogManager.instance().warnNoDb(OMemory.class, "Unable to determine the amount of installed RAM.", e);
/** * Verifies that all pointers which were allocated by allocator are freed. */ public void checkMemoryLeaks() { if (TRACK) { final long memCons = memoryConsumption.longValue(); if (memCons > 0) { OLogManager.instance() .warnNoDb(this, "DIRECT-TRACK: memory consumption is not zero (%d bytes), it may indicate presence of memory leaks", memCons); assert false; } synchronized (this) { for (TrackedPointerReference reference : trackedReferences) OLogManager.instance() .errorNoDb(this, "DIRECT-TRACK: unreleased direct memory pointer `%X` detected.", reference.stackTrace, reference.id); checkTrackedPointerLeaks(); assert trackedReferences.size() == 0; } } }
final ScriptEngine defEngine = scriptEngineManager.getEngineByName(DEF_LANGUAGE); if (defEngine == null) { OLogManager.instance().warnNoDb(this, "Cannot find default script language for %s", DEF_LANGUAGE); } else {
.warnNoDb(this, "Main storage configuration file %s is broken in storage %s, try to read from backup file %s", file, storageName, backupFile);
.warnNoDb(this, "Value of limit of simultaneously open files is too small, recommended value is %d", recommended);
if (osMemory == null) { OLogManager.instance() .warnNoDb(this, "Can not determine amount of memory installed on machine, default size of disk cache will be used"); return; OLogManager.instance().warnNoDb(null, "Not enough physical memory available for DISKCACHE: %,dMB (heap=%,dMB). Set lower Maximum Heap (-Xmx " + "setting on JVM) and restart OrientDB. Now running with DISKCACHE=" + diskCacheInMB + "MB",